Skip to content

Commit

Permalink
Fix juju 3 k8s configure
Browse files Browse the repository at this point in the history
  • Loading branch information
dosaboy committed May 23, 2024
1 parent 6305078 commit cc9cfc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubernetes/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
which kubectl || sudo snap install kubectl --classic
mkdir -p ~/.kube
kubecontrolplane_unit=$(juju status| sed -nr 's,(kubernetes-control-plane/[[:digit:]]+)\*.*,\1,p')
juju scp ${kubecontrolplane_unit}:config ~/.kube/config
ftmp=`mktemp -p .`
juju scp ${kubecontrolplane_unit}:config $ftmp
mv ./$ftmp ~/.kube/config

# If we're using keystone, let's create the user and setup everything
if [[ `juju status keystone --format=json 2>/dev/null| jq '.machines| length'` -ne 0 ]] ; then
Expand Down

0 comments on commit cc9cfc4

Please sign in to comment.