Skip to content

fix: improve namespace existence check in kubens with get/list fallback#453

Open
yeoyujie wants to merge 1 commit into
ahmetb:masterfrom
yeoyujie:master
Open

fix: improve namespace existence check in kubens with get/list fallback#453
yeoyujie wants to merge 1 commit into
ahmetb:masterfrom
yeoyujie:master

Conversation

@yeoyujie
Copy link
Copy Markdown

Updated namespaceExists to try get first, then fall back to list if permissions don't allow get.
This fixes cases where users can run kubectl get namespaces but not kubectl get namespace <name>, making kubens more flexible in restricted RBAC setups.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant