Azure Hands-On - Application and package management using Helm in AKS
Azure Learning Path for Cloud and DevOps Engineers

I have over 20 years of experience in IT Infrastructure and currently work at Microsoft as an Azure Kubernetes Support Engineer, where I support and manage the AKS, ACI, ACR, and ARO tools. Previously, I worked as a Fault Management Cloud Engineer at Nokia for 2.9 years, with expertise in OpenStack, Linux, Zabbix, Commvault, and other tools. In this role, I resolved critical technical incidents, ensured consistent uptime, and safeguarded against revenue loss from customers. Additionally, I briefly served as a Technical Team Lead for 3 months, where I distributed tasks, mentored a new team member, and managed technical requests and activities raised by our customers. Previously, I worked as an IT System Administrator at BN Paribas Cardif Portugal and other significant companies in Brazil, including an affiliate of Rede Globo Television (Rede Bahia) and Petrobras SA. In these roles, I developed a robust skill set, acquired the ability to adapt to new processes, demonstrated excellent problem-solving and analytical skills, and managed ticket systems to enhance the customer service experience.
My ability to thrive in high-pressure environments and meet tight deadlines is a testament to my organizational and proactive approach. By collaborating with colleagues and other teams, I ensure robust support and incident management, contributing to the consistent satisfaction of my customers and the reliability of the entire IT Infrastructure.
📝Introduction
Kubernetes allows us to manage the deployment lifecycle of cloud-native applications using a Kubernetes package manager. A Kubernetes package manager allows us to standardize, simplify, and implement reusable deployment strategies for our applications.
In this hands-on lab, we learned how to create and manage Kubernetes releases using Helm as a Kubernetes package manager.
Learning objectives
In this module, you'll learn how to:
Describe the benefits of using Helm as a Kubernetes package manager
Create a Helm chart for a cloud-native application
Manage a cloud-native application release using Helm

📝Basic Understanding of Helm
When deploying, versioning, and updating applications, we need to ensure we have the correct versions of software libraries and configurations so that the application functions as expected.
Let's say the development team decides to deploy a company website to Kubernetes. As part of the process, the team creates deployment, service, and ingress YAML-based files. They hardcode and maintain the information in each file for each target environment by hand. However, maintaining three files for each environment is cumbersome and increases in complexity as the application grows.

In this situation, we can use Helm to simplify the application deployment process and avoid hardcoded deployment variables and settings.
And, what is a Helm? It is a package manager for Kubernetes that combines all your application's resources and deployment information into a single deployment package.

We can imagine Helm similar to the Windows Package Manager on Windows, the Advanced Package Tool (apt) on Linux, or Homebrew on macOS. We specify the name of the application we want to install, update, or remove, and Helm takes care of the process.
With Helm, we are not limited to installing a single app at a time. It allows us to create templates, and human-readable YAML script files to manage your application's deployment. These template files allow us to specify all required dependencies, configuration mapping, and secrets used to manage the deploy of an application successfully.
Helm uses four components to manage application deployments on a Kubernetes cluster:
The Helm client
Helm charts
Helm releases
Helm repositories
Helm Client
It is a client-installed binary responsible for creating and submitting the manifest files required to deploy a Kubernetes application. It is responsible for the interaction between the user and the Kubernetes cluster.

In Azure, the Helm client is preinstalled in the Cloud Shell and supports all security, identity, and authorization features of Kubernetes, it is also available for all major operating systems.
Helm chart
It is a templated deployment package that describes a related set of Kubernetes resources. It contains all the information required to build and deploy the manifest files for an application to run on a Kubernetes cluster.
It consists of several files and folders to describe the chart. Some of the components are required and some are optional. What you choose to include is based on the apps configuration requirements.
The following list describes the file and folder components of a Helm chart with the required items in bold:

Helm release
It is the application or group of applications deployed using a chart. Each time you install a chart, a new instance of an application is created on the cluster. Each instance has a release name that allows you to interact with the specific application instance.
Helm repository
It is a dedicated HTTP server that stores information on Helm charts. The server hosts a file that describes charts and where to download each chart.
Benefits of using Helm
Helm introduces many benefits that simplify application deployment and improve productivity in the development and deployment lifecycle of cloud-native applications. With Helm, we have application releases that are:
Repeatable,
Reliable,
Manageable in multiple and complex environments, and
Reusable across different development teams.
📝Set up the environment
Clone a Sample Application
Navigate to the Azure Cloud Shell or Azure CLI and make sure you're using the Bash environment.
Set the subscription you want to use for this module using the
az account setcommand.az account set --subscription <subscription-name>Clone the sample application to your development environment using the
git clonecommand.git clone https://github.com/Azure-Samples/aks-store-demo.gitChange into the cloned directory using
cd.cd aks-store-demo
Create Azure resources
Create a resource group using the
az group createcommand.Azure CLICopyOpen Cloud Shell
az group create --name <resource-group-name> --location <location>Create an Azure container registry using the
az acr createcommand and provide our own unique registry name. The registry name must be unique within Azure.az acr create --resource-group <resource-group-name> --name <acr-name> --sku BasicCreate an AKS cluster using the
az aks createcommand and attach the ACR to the AKS cluster using the--attach-acrparameter.az aks create --resource-group <resource-group-name> --name <aks-cluster-name> --node-count 2 --attach-acr <acr-name> --generate-ssh-keysConnect to the AKS cluster using the
az aks get-credentialscommand.az aks get-credentials --resource-group <resource-group-name> --name <aks-cluster-name>Verify the connection to the AKS cluster using the
kubectl get nodescommand.kubectl get nodes
📝Create and install a Helm chart
Deploy a Helm chart
Navigate to the Azure Cloud Shell or Azure CLI and make sure you're in the aks-store-demo directory. If not, change to the directory using
cd.BashCopy
cd aks-store-demoChange into the
charts/aks-store-demodirectory usingcd.cd charts cd aks-store-demoDeploy the pet store front Helm chart using the
helm installcommand.helm install aks-store-demo ./aks-store-demoThe command should return a result similar to the following output:

Helm allows you to query all the installed release on the cluster. List all Helm releases using the
helm listcommand.helm list
Helm allows you to fetch manifest information related to each release. Fetch manifest information using the
helm get manifestcommand.helm get manifest aks-store-demo
Validate that the pod is deployed using the
kubectl get podscommand.kubectl get pods -o wide -w
Use
Ctrl+Cto exit the command once done.
Delete a Helm release
Delete the Helm release using the
helm deletecommand.helm delete aks-store-demoThe command should return a result similar to the following output:
release "aks-store-demo" uninstalled
Install a Helm chart with set values
We can override values for a Helm chart by passing either a value parameter or our own values.yaml file. For now, use the following commands to see how to update a value using the --set parameter.
Install the Helm chart using the
helm installcommand with the--setparameter to set thereplicaCountof the deployment template to five replicas.helm install --set replicaCount=5 aks-store-demo ./aks-store-demoValidate that five pod replicas were deployed using the
kubectl get podscommand.kubectl get pods -o wide -w



Use
Ctrl+Cto exit the command once done.Delete the Helm chart using the
helm deletecommand.helm delete aks-store-demo
📌Note - At the end of each hands-on Lab, always clean up all resources previously created to avoid being charged.
Congratulations — you have completed this hands-on lab covering the basics of creating an Application and package management using Helm in Azure Kubernetes(AKS).
Thank you for reading. I hope you understood and learned something helpful from my blog.
Please follow me on Cloud&DevOpsLearn and LinkedIn, franciscojblsouza






