-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Client doesn't implement provideClusterInfo #2298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This looks to me like the exec itself is not working correctly. What happens when you run Does this kubeconfig file work when you run it with |
Thanks for your response. "kubectl-gardenlogin" produces valid certificates in that shell. This is how I kind of worked around this issue: exec get-certificate with python.subprocess and use the certs with the client object. It also works with kubectl (and k9s for instance). It works as follows:
after that I can get the certs with
After that, when I run "kubectl get ns", it works, but the corresponding Python client sample errors with: "Error: failed to complete command options: ExecCredential does not contain cluster information". Which is true, because the ExecCredential delivered by get-certificate contains only kind, apiVersion, spec (interactive=false) and status (with expirationTimestamp, clientCertificateData and clientKeyData). Changing the value of provideClusterInfo in the kubeconfig doesn't seem to change anything. If you look into the code of base/config/exec_provider there's no mention of a cluster or clusterinfo as it is in the Go client. |
Ok, I think I see the issue. I believe that the message is coming from If you look at the code here: https://github.com/kubernetes-client/python/blob/master/kubernetes/base/config/exec_provider.py#L65 we definitely don't set the cluster info. The root of the problem is that we don't implement the |
What you expected to happen:
A Python script provided with a kubeconfig that contains a user exec section to get a client certificate should connect to the cluster.
The kubeconfig contains this section:
Running a Kubernetes Python script with this kubeconfig produces the following error:
The text was updated successfully, but these errors were encountered: