-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Get cluster scope resource using dynamic client error when set namespace. #111248
Comments
/sig api-machinery |
/assign |
/triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
/triage accepted |
What happened?
My namespace is obtained from the environment variable. When I don't set it, the code can return all clusterrole, but when I set the
ns
environment variable, it will report an errorthe server could not find the requested resource
What did you expect to happen?
When using kubectl to get the clusterrole, it can return normally even if the namespace parameter is added. So whether the dynamic client should also add a judgment?
How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
k8s version: 1.20
client-go version: v0.24.3
I didn't read the code of kubectl.
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: