kubernetes-client / python

Official Python client library for kubernetes
http://kubernetes.io/
Apache License 2.0
6.76k stars 3.27k forks source link

When I call the query deployment interface, it returns 403 forbidden. #2248

Open Heaven25333 opened 4 months ago

Heaven25333 commented 4 months ago

What happened ( 图片 ):

Anything else we need to know?:I have two versions of k8s here, one is version 1.24 and the other is version 1.26. When I call the API to query the deployment information, the 1.24 version can work normally, but the 1.26 version will return 403. Please help me check

Environment:

gaiusgdcruz commented 4 months ago

@Heaven25333 I think this is due to the lack of RBAC permissions for the user, grant the required role/permissions to the user and this error will be resolved. https://kubernetes.io/docs/reference/access-authn-authz/rbac/#kubectl-create-rolebinding

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten