Skip to content

Commit

Permalink
Change location of mounted kubeconfig file when it is being injected …
Browse files Browse the repository at this point in the history
…into workshop session.
  • Loading branch information
GrahamDumpleton committed Apr 22, 2022
1 parent 0cc6240 commit ca5550a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ NAMESPACE_FILE="/var/run/secrets/kubernetes.io/serviceaccount/namespace"
# cluster, and a kubeconfig has been provided we need to use that. We can't
# count on the directory where the kubeconfig is located being writable so copy
# it to $HOME/.kube/config. Only do this though if there isn't already an
# existing kubeconfig file.
# existing kubeconfig file. It is expected the kubeconfig file is mounted at
# the location /opt/kubeconfig/config.

if [ -f /opt/eduk8s/config/kubeconfig.yaml ]; then
if [ -f /opt/kubeconfig/config ]; then
if [ ! -f $HOME/.kube/config ]; then
mkdir -p $HOME/.kube
cp /opt/eduk8s/config/kubeconfig.yaml $HOME/.kube/config
cp /opt/kubeconfig/config $HOME/.kube/config
fi
fi

Expand Down

0 comments on commit ca5550a

Please sign in to comment.