Get startedGet started for free

Working with AKS Clusters

1. Working with AKS Clusters

In this video, we'll learn how to work with AKS clusters, from creating them to deploying applications and managing resources.

2. Creating a cluster

Azure Kubernetes Service makes it straightforward to create and operate Kubernetes clusters in the cloud. The first step is provisioning a cluster. You can do this through the Azure Portal, Azure CLI, or infrastructure-as-code tools like ARM templates or Bicep.

3. Creating a cluster

When you create a cluster, you define parameters such as the number of nodes, the VM size for those nodes, and the networking model. Azure then sets up the control plane automatically, so you don't have to manage its complexity. Within minutes, you have a working cluster ready to host workloads.

4. Connecting with kubectl

Once the cluster is created, you interact with it using kubectl, the standard Kubernetes command-line tool. You configure kubectl to connect to your AKS cluster by downloading credentials with the Azure CLI.

5. Connecting with kubectl

From there, you can run commands to view nodes, inspect pods, and deploy applications. This workflow is identical to working with any Kubernetes cluster, which means skills learned here are transferable across environments.

6. Deploying applications

Deploying applications to AKS involves creating Kubernetes manifests.

7. Deploying applications

These YAML files describe the desired state of your application: which container image to use, how many replicas to run, and what networking or storage resources are required.

8. Deploying applications

You apply these manifests with kubectl apply, and Kubernetes ensures the actual state matches the desired state.

9. Deploying applications

For example, if you specify three replicas of a web app, Kubernetes will schedule three pods and restart them if they fail. This declarative model is one of Kubernetes' greatest strengths.

10. Scaling workloads

Scaling applications in AKS can be done manually or automatically. You can increase the number of replicas in a deployment to handle more traffic, or configure the Horizontal Pod Autoscaler to adjust replicas based on CPU or memory usage.

11. Scaling workloads

At the node level, AKS supports cluster auto-scaling, which adds or removes nodes depending on demand. This elasticity ensures applications remain responsive while optimizing costs.

12. Networking

Networking in AKS integrates with Azure Virtual Networks. Pods can receive IP addresses from the VNet, enabling secure communication with other Azure resources or the Internet. Services provide stable endpoints for accessing pods, and ingress controllers manage external traffic.

13. Storage

Storage is equally important: AKS supports persistent volumes backed by Azure Disks or Files, allowing stateful applications to run reliably.

14. Monitoring and troubleshooting

Monitoring and troubleshooting are essential parts of cluster management. Azure Monitor and Log Analytics provide visibility into cluster health, resource usage, and application performance. You can set alerts to detect issues early and use logs to debug problems. Together, these tools help maintain reliability and performance in production environments.

15. Recap

Working with AKS clusters involves creating them, deploying applications, scaling workloads, and integrating networking and storage. With monitoring and troubleshooting in place, you can operate clusters confidently and deliver resilient applications.

16. Let's practice!

Ready to apply what you've learned? Complete the exercises to strengthen your understanding.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.