eks-rolling-update
eks-rolling-update copied to clipboard
K8S_CONTEXT environment variable ignored when draining nodes
The K8S_CONTEXT
environment variable is used when setting up the python Kubernetes API client, but the actual node draining operation is performed by shelling out to kubectl
rather than using the API, and the --context
flag (and K8S_CONTEXT
) variable are not passed when doing so. You can work around this by using the EXTRA_DRAIN_ARGS
variable, but it isn't documented that you need to do so, and, it probably shouldn't be necessary at all.