Kuberenetes Python client doesn't work with AWS EKS (Exec plugin) in Windows #2276
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
What happened (please include outputs or screenshots):
Kubernetes Python client doesn't work with AWS EKS in Windows.
I have AWS EKS clusters created and setup. And my environment to testing is Windows OS. When I run
config.load_config_file=KUBE_CONFIG_PATH)
, it works well in other OS but in Windows OS, it shows:I identified issue is actually coming from here, in Windows OS seems like we need to have
shell=True
argument also added when executing command or it will failWhat you expected to happen:
Expect Kubernetes Python Client should work for all platforms
How to reproduce it (as minimally and precisely as possible):
kubeconfig
filepython
>>> from kubernetes import config
config.load_kube_config(config_file="{PATH_TO_THE_KUBECONFIG_FILE")
ERROR:root:[WinError 2] The system cannot find the file specified
Anything else we need to know?:
Kindly check the code link, I think that's the root cause. Verified that adding
shell=True
in here make Kubernetes Python client work well to load kubeconfigin Windows. And did we handle similar things for calling
subprocess.Popen
in Windows before?Environment:
kubectl version
): Directly using Kubernetes Python client with Version: 30.1.0python --version
) Python 3.11.9pip list | grep kubernetes
): 30.1.0The text was updated successfully, but these errors were encountered: