Skip to content

Latest commit

 

History

History
171 lines (113 loc) · 4.08 KB

release-management.md

File metadata and controls

171 lines (113 loc) · 4.08 KB

🚀 Lab 02- Release Management

🎯 Objective

Get hands-on experience with Helm's rollout commands and learn how to manage your Kubernetes applications effectively.

estimated time: 15m

📚 Instructions

Step 0: Cleanup Previous Lab

show the current installed chart

helm ls -a

helm

remove the chart

helm delete demo

1️⃣ Step 1: Use Bitnami helm chart for rabbit MQ

  1. Cd to the Lab02 Folder on this Repo
cd  Lab02
  1. To create a new Bitnami Rabbit MQ Chart , using defaults , we will use
helm upgrade my-rabbit oci://registry-1.docker.io/bitnamicharts/rabbitmq --install

NOTE: Helm chart can be installed from remote repositories without donwloading them

  1. Ensure the Helm is installed correctly
kubectl get pods

rabbit1

2️⃣ Step 2: Modify the chart by override values file.

  1. we shall now add more pods to the statefull set to make it more reliable solution.

  2. Create a values.yaml file with the following content :

replicaCount: 3
helm upgrade my-rabbit oci://registry-1.docker.io/bitnamicharts/rabbitmq -f values.yaml --install

NOTE: In order to understand what is the right values.yaml file strucutre, you need to inspect the Helm chart from the publisher. navigate to https://github.com/bitnami/charts/blob/main/bitnami/rabbitmq/values.yaml to view the bitnami rabbitmq values file

  1. Wait for the 3 Pods to spin up and ensure the Helm is installed correctly
kubectl get pods

rabbit2

  1. Check the status of the Helm Chart
helm status my-rabbit
  1. Check the history of the Helm Chart
helm history my-rabbit

you should see 2 versions

versions

3️⃣ Step 3: Working with multiple Values files

  1. lets assume that for dev environment you want to have 5 replicas with a limit of 1 CPU and 2G for each pod for the Dev Environment.
Solution Add another values file called dev.values.yaml with the following content
replicaCount: 5
resources:
   limits:
      cpu: 1000m
      memory: 2Gi

Then run the following command

helm upgrade my-rabbit oci://registry-1.docker.io/bitnamicharts/rabbitmq --values values.yaml --values dev.values.yaml --install

2 . Ensure there is a rollout that was deployed by inspecting the helm history :

helm history my-rabbit

history

4️⃣ Step 4: OPEX Issues => REVERT !

oh no , your previous installation caused many VM's to spin up during the weekend ,causing huge OPEX impact. you are being asked to revert the changes as fast as possible .

  • the ask is to go back to the first version , where you had 1 pod.
  • You are not allowed to delete the chart -> some customers are using it !
helm rollback my-rabbit 1

we have switched back to version 1 : our first and most reliable version . Note this action is also recored as history action.

helm history my-rabbit

history2

5️⃣ Step 5: Cleanup and the problem with helm

lets try to cleanup the helm chart by running

helm delete my-rabbit

after few moments it seems all is clear , right ?

Wrong

kubectl get pvc

Helm does not delete PVC's and has some serious challanges with CRD's as well .

This will prevent us from doing more updates to the chart unless special hoolks and patterns will be applied.

PVCS

Run the follwoing command to clean the PVC's

 kubectl delete pvc --all --force

🎉 Conclusion Congratulations! You've just learned how to use Helm's rollout commands. Keep practicing and exploring other Helm commands to manage your Kubernetes applications effectively. Happy Helm-ing! 🚀