Skip to content

Commit

Permalink
kind cluster merge don't overwrite kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
sallyom committed Oct 3, 2023
1 parent b8aa5d3 commit 471f2ce
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion kind/kind-up-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ EOF

sudo kind get kubeconfig > /tmp/config
sudo chown $USER:$USER /tmp/config
mv /tmp/config ~/.kube/config
if [[ -d ~/.kube ]] && [[ -f ~/.kube/config ]]
then
export KUBECONFIG=~/.kube/config:/tmp/config
kubectl config view --flatten > merged-config.yaml
mv merged-config.yaml ~/.kube/config
else
mv /tmp/config ~/.kube/config
fi

kubectl config use-context kind-kind

# install ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
Expand Down

0 comments on commit 471f2ce

Please sign in to comment.