From b673dd5675d57859796fee935d0bd65eba7e3a1d Mon Sep 17 00:00:00 2001 From: Thiago Arrais Date: Fri, 13 Oct 2017 14:24:12 -0300 Subject: [PATCH] Fix run env usage I couldn't get the envvars correctly defined inside the busybox pod when using the command as is. I've changed the env options and got it to run. --- docs/user-guide/walkthrough/k8s201.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/walkthrough/k8s201.md b/docs/user-guide/walkthrough/k8s201.md index b9d659c05f..2be84046ff 100644 --- a/docs/user-guide/walkthrough/k8s201.md +++ b/docs/user-guide/walkthrough/k8s201.md @@ -143,7 +143,7 @@ Provided the service IP is accessible, you should be able to access its http end $ export SERVICE_IP=$(kubectl get service nginx-service -o go-template='{{.spec.clusterIP}}') $ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template='{{(index .spec.ports 0).port}}') $ echo "$SERVICE_IP:$SERVICE_PORT" -$ kubectl run busybox --generator=run-pod/v1 --image=busybox --restart=Never --tty -i --env "SERVICE_IP=$SERVICE_IP,SERVICE_PORT=$SERVICE_PORT" +$ kubectl run busybox --generator=run-pod/v1 --image=busybox --restart=Never --tty -i --env "SERVICE_IP=$SERVICE_IP" --env "SERVICE_PORT=$SERVICE_PORT" u@busybox$ wget -qO- http://$SERVICE_IP:$SERVICE_PORT # Run in the busybox container u@busybox$ exit # Exit the busybox container $ kubectl delete pod busybox # Clean up the pod we created with "kubectl run"