burrsutter/9stepsawesome

Adding information in 3_kubectl_exec.adoc

jeffersonbezerra opened this issue · 2 comments

Burr,
At the end of the file 3_kubectl_exec.adoc, there are these lines

$ docker build -f Dockerfile_Memory -t 9stepsawesome/myboot:v2 .
# and delete an pods based on that image
$ kubectl delete pods -l app=myboot

Since no change was made in the kubernetes myboot deployment, after exec "kubectl delete pods -l app=myboot", kubernetes will create a new pod of 9stepsawesome/myboot:v1, am I right?

For me the example only worked after I edit the image in the deployment with:

kubectl edit deployment myboot

or

$ kubectl set image deployment/myboot myboot=9stepsawesome/myboot:v2

another possibility is to build a docker umage with the version v1

$ docker build -f Dockerfile_Memory -t 9stepsawesome/myboot:v1 .
# and delete an pods based on that image
$ kubectl delete pods -l app=myboot

Hello @jeffersonbezerra I have been remiss in looking at my issues. I believe you are correct. The Deployment must point to the "v2" image tag in order for the deletion of the pod and it's recreation (due to ReplicaSet) to pick up the correct image.