Domain 1 of 4 · Chapter 6 of 7

Deploy to AKS with manifest files

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Developing AI Cloud Solutions on Azure premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • Getting a working kubectl context for the cluster
  • What kubectl apply does to the cluster
  • Anatomy of a Deployment manifest
  • Rolling updates and the two numbers that bound them
  • Requests, limits, and the QoS class they produce
  • Injecting configuration and secrets from the manifest
  • Exposing pods with a Service
  • Pulling the image from Azure Container Registry
  • Exam-pattern recognition

Choosing a Service type in AKS

ConsiderationClusterIPNodePortLoadBalancerExternalName
Who can reach itOnly clients inside the clusterAnything that can reach a node IP address on the allocated portAnything that can reach the frontend IP, public by default or private with the internal annotationWhoever can resolve and reach the external DNS name it points at
What AKS creates in AzureNothing outside the clusterNothing outside the cluster; you address the node VMs yourselfA new frontend IP and rule on the cluster's Azure Load Balancer, Standard SKU by defaultNothing; there is no proxying at all
What the caller connects toA cluster-internal IP and the in-cluster DNS name of the Service<node-ip>:<nodePort>The address shown in the EXTERNAL-IP column of kubectl get serviceThe DNS name in spec.externalName, resolved by cluster DNS
Also allocatesNothing furtherA ClusterIP as wellA nodePort and a ClusterIP as wellNothing; it has no selector and no endpoints
FitsService-to-service calls inside one clusterA load balancer or gateway you operate yourself in front of the nodesPublishing an application front endPointing in-cluster clients at a managed Azure endpoint by its own name
Wrong choice whenThe requirement says reachable from outside the clusterYou want one stable address rather than one per nodeThe workload is internal only and a public IP would be an exposure you did not intendYou need load balancing, health checks, or anything else that depends on endpoints

Decision tree

Does it front pods in this cluster?Reachable from outside the cluster?Should Azure provide the frontend?Open to the public internet?ExternalNamea DNS alias, no endpointsClusterIPthe default typeNodePortyou run the load balancerLoadBalancerinternal frontend IPLoadBalancerpublic frontend IPNoYesNoYesNoYesNoYes

Cheat sheet

  • az aks get-credentials wires kubectl to the cluster
  • kubectl context selects the active cluster
  • The --admin flag returns certificate-based cluster-admin access
  • kubectl apply reconciles declared desired state
  • A Deployment manages replicas via a pod template
  • RollingUpdate replaces pods gradually
  • Injecting config and secrets into AKS pods via manifests
  • CPU/memory requests and limits in an AKS pod spec
  • A LoadBalancer Service gets an Azure public IP
  • A Service routes by label selector
  • az aks update --attach-acr grants pull access
  • ImagePullBackOff signals a pull or auth failure

Unlock with Premium — includes all practice exams and the complete study guide.

References

  1. Organizing cluster access using kubeconfig files
  2. Limit access to kubeconfig in Azure Kubernetes Service (AKS)
  3. AKS config file missing when connecting to cluster
  4. Cluster authentication concepts in Azure Kubernetes Service (AKS)
  5. Manage local accounts with Microsoft Entra integration (AKS)
  6. Tutorial: Deploy an application to Azure Kubernetes Service (AKS)
  7. Declarative management of Kubernetes objects using configuration files
  8. Deployment (Kubernetes API reference, apps/v1)
  9. Deployments (Kubernetes concepts)
  10. Azure Kubernetes Service (AKS) core concepts
  11. Resource management for pods and containers
  12. Pod Quality of Service classes
  13. Node resource reservations in Azure Kubernetes Service (AKS)
  14. ConfigMaps (Kubernetes concepts)
  15. Secrets (Kubernetes concepts)
  16. Use the Azure Key Vault provider for Secrets Store CSI Driver in AKS
  17. Service (Kubernetes concepts)
  18. Use a public standard load balancer in Azure Kubernetes Service (AKS)
  19. Create an internal load balancer in Azure Kubernetes Service (AKS)
  20. Integrate Azure Container Registry with Azure Kubernetes Service (AKS)
  21. Images (Kubernetes concepts)