News for hackers. Stuff that matters.
Re:Everything useful I know about kubectl by busterarm on Monday July 05, 2021 @12:15PM (#27739439)
A lot of people like kubectx. Or specifying contexts. Personally I hate both approaches.

For the several dozen clusters that I manage, I have separate kubeconfig files for each and I use the --kubeconfig flag.

It's explicit and I have visual feedback in the command I run for the cluster I'm running against, by short name. No stupidly long contexts.

Re:Everything useful I know about kubectl by kemitche on Monday July 05, 2021 @01:06PM (#27739886)
My approach was to have a default kubeconfig for dev/QA environments, and a separate for production. I had a quick wrapper script to use the prod config file - it would set the KUBECONFIG env car to use the prod file, and update my PS1 to be red, a clear differentiator that reminds me I'm pointed at prod.
Re:Everything useful I know about kubectl by icythere on Monday July 05, 2021 @12:21PM (#27739501)
Exactly! Having separate config is very easily. I had that support in my tool ;)