Kuberentes client-go method to drain a node

8/8/2019

Is there a go client to drain a Kubernetes node. I am writing E2E testcases using existing kubernetes E2E framework and i need to cover a node drain scenario for storage.

-- ambikanair
client-go
kubernetes

1 Answer

8/8/2019

There currently isn't a method in client-go to facilitate draining. I believe that there is some work to bring that functionality to client-go, but it's not there yet. That being said you can base an E2E test case on the drain code found at: https://github.com/kubernetes/kubectl/tree/master/pkg/drain

-- Nicholas Lane
Source: StackOverflow