DEV Community

웃

Posted on • Edited on

Effortless K8s Namespace Switching Using Konfig

1. Create a directory in the .kube folder:
❯ mkdir -p ~/.kube/configs

2. Download all the config files and place them in the folder

❯ cd ~/.kube/configs
❯ mv ~/Downloads/dev.yml .
❯ mv ~/Downloads/test.yml .
Enter fullscreen mode Exit fullscreen mode

3. Install Konfig

❯ kubectl krew install konfig

4. Use Konfig to merge all the configs into a single config file that Kubernetes uses

❯ kubectl konfig merge ~/.kube/configs/* > ~/.kube/config

Now, you can easily switch between different environments using kubectx and kubens.

Top comments (0)

Cloudinary image

Zoom pan, gen fill, restore, overlay, upscale, crop, resize...

Chain advanced transformations through a set of image and video APIs while optimizing assets by 90%.

Explore

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay