@@ -80,8 +80,10 @@ Our master node makes use of some of the files in this repo so lets securely cop
8080
8181 master_ip=$(terraform output -json | jq -r '.master_address.value')
8282 ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip sudo kubeadm init > k8s-init.log
83+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "sudo cp /etc/kubernetes/admin.conf /home/ubuntu/"
84+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "sudo chown \$(id -u):\$(id -g) \$HOME/admin.conf"
8385 grep -e --token k8s-init.log > join.cmd
84- ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f https://git.io/weave-kube
86+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f https://git.io/weave-kube-1.6
8587
8688<!-- deploy-doc-end -->
8789
@@ -107,7 +109,7 @@ There are two options for running Weave Scope, either you can run the UI locally
107109<!-- deploy-doc-start create-infrastructure -->
108110
109111 master_ip=$(terraform output -json | jq -r '.master_address.value')
110- ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml'
112+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml'
111113
112114<!-- deploy-doc-end -->
113115
@@ -139,7 +141,7 @@ You may optionally choose to configure Weave Flux which allows automatic deploym
139141<!-- deploy-doc-start create-infrastructure -->
140142
141143 master_ip=$(terraform output -json | jq -r '.master_address.value')
142- ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f /tmp/manifests/sock-shop-ns.yaml -f /tmp/manifests/zipkin-ns.yaml -f /tmp/manifests
144+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f /tmp/manifests/sock-shop-ns.yaml -f /tmp/manifests/zipkin-ns.yaml -f /tmp/manifests
143145
144146<!-- deploy-doc-end -->
145147
@@ -194,7 +196,7 @@ This will send some traffic to the application, which will form the connection g
194196 docker run --rm weaveworksdemos/load-test -d 300 -h $elb_url -c 2 -r 100
195197
196198 master_ip=$(terraform output -json | jq -r '.master_address.value')
197- ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "kubectl run -i -t -\-namespace=sock-shop healthcheck -\-restart=Never -\-image=weaveworksdemos/healthcheck:snapshot -- -s orders,carts,payment,user,catalogue,shipping,queue-master -d 60 -r 5"
199+ ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "KUBECONFIG=\$HOME/admin.conf kubectl run -i -t -\-namespace=sock-shop healthcheck -\-restart=Never -\-image=weaveworksdemos/healthcheck:snapshot -- -s orders,carts,payment,user,catalogue,shipping,queue-master -d 60 -r 5"
198200
199201 set +e
200202
0 commit comments