Is there a way for kustomize to reject applying an overlay if KUBECONFIG
is not set to the correct cluster. I'm thinking of creating a shell script that does this, is there a better way?
We apply overlays with kubectl apply -k overlays/foo
. It has been the case that KUBECONFIG
is set to the wrong cluster thus overwriting configurations and causing havoc...
A script seems to be the only way at the moment. Maybe someone can also use this. The content of the CONTEXT file is the context that should be used.