TODO App Deployment

Homework Lab

Step 1: Clone the Helm chart from Bitnami's Github repository:

cd "05Helm\5.3 TODO APP"

Step 2: Check for and install missing dependencies with helm dep.

helm dep list
helm dep update
helm dep build

Step 3: Lint the chart with helm lint to ensure it has no errors.

helm lint .

Step 4: Deploy the Helm chart with helm install

helm install . my-todo-app --set serviceType=NodePort

This will produce two pods (one for the Node.js service and the other for the MongoDB service). Pay special attention to the NOTES section of the output, as it contains important information to access the application.

  1. Obtain the URL for the Node application

export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services my-todo-app-mean)
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/

Browse to the specified URL and you should see the sample application running.

  1. Verify the Status of HELM Release

helm status my-todo-app
  1. Node.js pod up to three copies using the kubectl scale command below

kubectl scale --replicas 3 deployment/my-todo-app-mean
  1. scale it back down to two using the command below

kubectl scale --replicas 2 deployment/my-todo-app-mean
  1. Lets Delete One Pod and Verify

kubectl get pods
kubectl delete pod POD-ID

Replace the POD-ID placeholder with an actual pod identifier from the output of the kubectl get pods command.

  1. Verify the new pod is created or not

    kubectl get pods -w

    Balance traffic between pods

  2. Expose the SErvice on a Specfic port on Everynode.

helm install . my-todo-app --set serviceType=NodePort
  1. Verify this by checking the details of the service

kubectl describe svc my-todo-app

Perform rolling updates and rollbacks

  1. Upgrade

helm upgrade my-todo-app .
  1. Check upgrade status

helm history my-todo-app

As shown in the output, the application has been upgraded and is now running revision 2.

  1. For example, to roll back to the original version of the application (revision 1), use this command:

helm rollback my-todo-app 1
  1. check the status

 helm history

you will see that revision 2 will have been superseded by a copy of revision 1, this time labelled as revision 3.

Delete HELM Release

delete and reinstall the Helm chart at any time, use the helm delete command

helm delete my-todo-app

View the Deleted HELM Releases

helm list --deleted

Last updated

Was this helpful?