Helm upgrade

This section will explain how to perform upgrades using helm operators in a similar way:

  1. Run the following command:
helm install stable/wordpress --name handsonaks-wp --set smtpHost=smtp.google.com --set smtpPort=25 --set smtpPassword=abcd1234 --set [email protected] --set smtpUsername=handsonaks --set smtpProtocol=ssl

Wait for 5 to 10 minutes for the pods to deploy.

Looking at the tags from https://hub.docker.com/r/bitnami/wordpress/tags at the time of writing, we see a new tag of 5.0.2-r9.

  1. Let's live life dangerously and upgrade to the release candidate:
helm upgrade handsonaks-wp stable/wordpress --set image.tag=5.0.2-r9

When you run the kubectl get pods command, you should see two pods for wordpress

ab443838-9b3e-4811-b287-74e417a9@Azure:~$ kc describe pods/handsonaks-wp-wordpress-<new-pod-id> | grep Image
Image: docker.io/bitnami/wordpress:5.0.2-r9
Image ID: docker-pullable://bitnami
...
ab443838-9b3e-4811-b287-74e417a9@Azure:~$ kc describe pods/handsonaks-wp-wordpress-<old-pod-id> | grep Image
Image: docker.io/bitnami/wordpress:5.0.2
Image ID: docker-pullable://bitnami/wordpress@sha256:

Running describe on them and grepping for images should show that the wordpress pod is being redeployed with the image.tag set in the second step.

  1. Finally, cleaning up the running the following command:
helm delete --purge handsonaks-wp

Thus, we have upgraded our application using helm operators.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset