We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What happened (please include outputs or screenshots):
By just updating version 31 to 32 start to failing pip install kubernetes --upgrade
import kubernetes print(kubernetes.version)
from kubernetes import config, client config.load_kube_config(config_file="admin.config")
k8s_api = client.CoreV1Api() print(k8s_api.list_node().items)
Sanity test failure:
18:43:49 [2025-01-27T13:13:49.229Z] 2025-01-27 13:13:48 INFO ControlPlane Validation 18:43:49 [2025-01-27T13:13:49.229Z] 2025-01-27 13:13:48 INFO Kubeconfig file found: /u01/jenkins/builds/pcaoke-terraform-runs/automation/workflow2/workflow2.config 18:43:49 [2025-01-27T13:13:49.484Z] 2025-01-27 13:13:49 ERROR exec: failed to decode process output: Expecting value: line 1 column 1 (char 0) 18:43:49 [2025-01-27T13:13:49.740Z] 2025-01-27 13:13:49 INFO Sanity test failed! 18:43:49 [2025-01-27T13:13:49.740Z] Unexpected error: (403) 18:43:49 [2025-01-27T13:13:49.740Z] Reason: Forbidden 18:43:49 [2025-01-27T13:13:49.740Z] HTTP response headers: HTTPHeaderDict({'Audit-Id': '9ead31fa-772b-4684-9ae5-04b23edd5700', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '9275478a-b4d2-4490-b796-e34dae0d0567', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd9ebd08e-f5b5-44ca-9f00-9ae465fd44a7', 'Date': 'Mon, 27 Jan 2025 13:13:49 GMT', 'Content-Length': '256'}) 18:43:49 [2025-01-27T13:13:49.740Z] HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"nodes is forbidden: User "system:anonymous" cannot list resource "nodes" in API group "" at the cluster scope","reason":"Forbidden","details":{"kind":"nodes"},"code":403}
What you expected to happen: config file is loaded correctly and the list of kubernetes nodes is displayed
How to reproduce it (as minimally and precisely as possible): Above the test and trace
Anything else we need to know?: Only change was
Environment:
kubectl version
python --version
pip list | grep kubernetes
The text was updated successfully, but these errors were encountered:
this is related to #2334. Please stick with kubernetes==31.0.0 and wait for the fix to be release.
kubernetes==31.0.0
Sorry, something went wrong.
No branches or pull requests
What happened (please include outputs or screenshots):
By just updating version 31 to 32 start to failing
pip install kubernetes --upgrade
python code
import kubernetes
print(kubernetes.version)
from kubernetes import config, client
config.load_kube_config(config_file="admin.config")
k8s_api = client.CoreV1Api()
print(k8s_api.list_node().items)
Sanity test failure:
18:43:49 [2025-01-27T13:13:49.229Z] 2025-01-27 13:13:48 INFO ControlPlane Validation
18:43:49 [2025-01-27T13:13:49.229Z] 2025-01-27 13:13:48 INFO Kubeconfig file found: /u01/jenkins/builds/pcaoke-terraform-runs/automation/workflow2/workflow2.config
18:43:49 [2025-01-27T13:13:49.484Z] 2025-01-27 13:13:49 ERROR exec: failed to decode process output: Expecting value: line 1 column 1 (char 0)
18:43:49 [2025-01-27T13:13:49.740Z] 2025-01-27 13:13:49 INFO Sanity test failed!
18:43:49 [2025-01-27T13:13:49.740Z] Unexpected error: (403)
18:43:49 [2025-01-27T13:13:49.740Z] Reason: Forbidden
18:43:49 [2025-01-27T13:13:49.740Z] HTTP response headers: HTTPHeaderDict({'Audit-Id': '9ead31fa-772b-4684-9ae5-04b23edd5700', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '9275478a-b4d2-4490-b796-e34dae0d0567', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd9ebd08e-f5b5-44ca-9f00-9ae465fd44a7', 'Date': 'Mon, 27 Jan 2025 13:13:49 GMT', 'Content-Length': '256'})
18:43:49 [2025-01-27T13:13:49.740Z] HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"nodes is forbidden: User "system:anonymous" cannot list resource "nodes" in API group "" at the cluster scope","reason":"Forbidden","details":{"kind":"nodes"},"code":403}
What you expected to happen:
config file is loaded correctly and the list of kubernetes nodes is displayed
How to reproduce it (as minimally and precisely as possible):
Above the test and trace
Anything else we need to know?:
Only change was
Environment:
kubectl version
): 1.29.2python --version
) 3.11pip list | grep kubernetes
) 32The text was updated successfully, but these errors were encountered: