Skip to content

Commit a80eab4

Browse files
author
Merlin Ran
authored
Update 01_install_k8s.sh to export cluster admin user credential
Without this, the script would print the following: ``` I0521 14:47:08.960811 31083 update_cluster.go:313] Exporting kubecfg for cluster kops has set your kubectl context to <...> W0521 14:47:09.316060 31083 update_cluster.go:337] Exported kubecfg with no user authentication; use --admin, --user or --auth-plugin flags with `kops export kubecfg` ... W0521 14:44:51.631147 30814 validate_cluster.go:173] (will retry): unexpected error during validation: error listing nodes: Unauthorized ... ``` Even if the user run `kops update cluster` with `--admin` manually as instructed, the existing `kops` session would still fail.
1 parent 57172bd commit a80eab4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

k8s/01_install_k8s.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fi
5353

5454
kops create -f $CLUSTER_SPEC
5555
kops create secret --name $CLUSTER_NAME sshpublickey admin -i $PUBKEY
56-
kops update cluster $CLUSTER_NAME --yes
56+
kops update cluster $CLUSTER_NAME --yes --admin
5757

5858
# Wait for worker nodes and master to be ready
5959
kops validate cluster --wait 20m

0 commit comments

Comments
 (0)