-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zarf doesn't consider $KUBECONFIG env when running commands #315
Comments
@YrrepNoj can you try something a little different for me and paste the console results in? export KUBECONFIG=~/.kube/otherconfig # Configure system to talk to cluster A
kubectl get pods -A # Confirm connection to cluster A
kind create cluster # Create cluster B
echo $KUBECONFIG # See whether kind changed KUBECONFIG
kubectl get pods -A # Confirm connection to cluster B |
@RothAndrew I think I understand what you're trying to ask. After that stage of commands here is what kubeconfig that lives at $KUBECONFIG looks like.
|
What is the error when you try to run |
Assuming your $KUBECONFIG is different from |
Summary
Now that Zarf can support deploying onto existing clusters, we should be considering that users local $KUBECONFIG env when determining if there is an existing cluster to deploy onto. Currently, Zarf is hard coded to look for an existing kubeconfig at
~/.kube/config
. This was perfectly fine when Zarf also was responsible for standing up its on k3s cluster but isn't as clear now.Steps to reproduce
export KUBECONFIG=~/.kube/otherconfig
kind create cluster
kubectl get pods -A
-> Returns the pods on the newly created clusterzarf init --confirm
-> Returns an error because it can't find a k8s even though the above kubectl command couldExpected Behavior
The Zarf CLI should check if the $KUBECONFIG env is set and prioritize using it whenever possible.
The text was updated successfully, but these errors were encountered: