Kubectl Change Namespace -

kubectl config get-contexts

The standard way to change your namespace without external tools is by modifying your current context. Kubernetes stores your preferences in a file called kubeconfig. You can update this file to point to a specific namespace using the following command: kubectl config set-context --current --namespace= This command breaks down as follows: kubectl config: Accesses the configuration settings. set-context: Modifies an existing context entry. --current: Targets the context you are currently using. kubectl change namespace

By following this guide, you should now be able to change namespaces efficiently using kubectl . Happy Kuberneting! kubectl config get-contexts The standard way to change

This will list the pods in the dev namespace. kubectl change namespace

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.