Corruption of config files (all field are set to null)
When using multiple config file (by using a KUBECONFIG env var containing multiple paths separated by ":") and launching kubectx, all the files not already in used are modified with all the field set to null.
apiVersion: v1
clusters: null
contexts: null
current-context: delivery
kind: Config
preferences: {}
users: null
The documentation about contiguring the KUBECONFIG env variable: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable
Thanks for the report! This is obviously bug.
I think I should look into how kubectl load it's context (thought I implemented in same way). But I'm so busy right now. I'm not sure when I might fix this. Please use single kubeconfig for now or just use https://github.com/ahmetb/kubectx.