Skip to content

Allow setting namespace when no permission to list namespaces #83

@josalmi

Description

@josalmi

We have users that are only allowed to access single namespace in the cluster with very restricted permissions. It would be nice to have option to set namespace to context even when user doesn't have permission to list all namespaces. Ideally kubens could verify from user if they want to set namespace even if it can't verify the namespace exists or to have a flag like --force to set without verifying.

This it what happens now even if namespace exists but user doesn't have right to list namespaces:

$ kubens helloworld
Error from server (Forbidden): namespaces is forbidden: User "josalmi" cannot list namespaces at the cluster scope: Required "container.namespaces.list" permission.
error: no namespace exists with name "helloworld".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions