AKS mental model: Azure runs the control plane; your workloads run on nodes
Azure Kubernetes Service is a managed Kubernetes service. Kubernetes still supplies the scheduling, reconciliation and service-discovery model, while Azure operates the cluster control plane. The API server accepts desired state, the scheduler selects a node for each pending pod, and controllers continually compare the actual state with the declared state.
Your application containers run on worker nodes in node pools. A system node pool hosts critical system pods; additional user node pools can isolate application workloads by operating system, VM size, availability requirements, labels and taints. Managed does not mean responsibility-free: you choose workload configuration, identity, network exposure, capacity, health probes, upgrade strategy, data protection and observability.
AKS removes the burden of operating the Kubernetes control plane. It does not automatically make a poorly configured application secure, scalable or highly available.
Follow the request and image paths through the architecture
Accepts desired state and coordinates the cluster.
Know what each Kubernetes object contributes
Runs containers
Pods are replaceable scheduling units. Do not design around a permanent pod IP or manually repair a failed pod.
Maintains replicas
A Deployment manages ReplicaSets, rolling updates and rollback history for stateless workloads.
Provides a stable endpoint
A Service selects healthy pods by labels and provides stable discovery while pod identities change.
Routes HTTP traffic
An Ingress resource expresses routing rules; an installed Ingress controller implements them.
Supplies compute
Nodes run kubelet, the container runtime and networking components required by pods.
Organizes resources
Namespaces create logical boundaries for names, quotas, policies and role assignments—not a complete security boundary by themselves.
Five-stage workflow: image to running Azure application
Package
Build an immutable container image and test it locally.
Store
Push the versioned image to Azure Container Registry.
Provision
Create an AKS cluster and authorize image pulls from ACR.
Deploy
Apply a Kubernetes Deployment and expose it with a Service.
Operate
Observe health, scale safely and troubleshoot from evidence.
1. Build and push a versioned image
Use a meaningful immutable tag such as a commit identifier rather than relying on latest. Scan the image, keep the runtime small and avoid embedding credentials. Push it to ACR, where the deployment pipeline and AKS identity can retrieve it.
az acr build --registry myregistry --image web:1.0.0 .
az acr repository show-tags --name myregistry --repository web --output table2. Create AKS and authorize ACR pulls
The learning example below uses Azure CLI. Names, region, identity, networking and node sizing must be adapted to the environment. For production, evaluate the AKS baseline architecture instead of accepting quickstart defaults.
az group create --name rg-aks-study --location eastus
az aks create \
--resource-group rg-aks-study \
--name aks-study \
--node-count 3 \
--generate-ssh-keys \
--attach-acr myregistry
az aks get-credentials --resource-group rg-aks-study --name aks-study
kubectl get nodes--attach-acr configures registry pull integration for a supported setup. In controlled environments, explicitly verify the cluster identity and its least-privilege role assignment at ACR scope.
Declare the workload with a Deployment and Service
The Deployment below asks Kubernetes to keep three application replicas available. Readiness and liveness probes serve different purposes: readiness controls whether a pod receives traffic; liveness can restart a stuck container. Resource requests influence scheduling, while limits cap resource use.
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 3
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: myregistry.azurecr.io/web:1.0.0
ports:
- containerPort: 8080
readinessProbe:
httpGet: { path: /ready, port: 8080 }
livenessProbe:
httpGet: { path: /health, port: 8080 }
resources:
requests: { cpu: 100m, memory: 128Mi }
limits: { cpu: 500m, memory: 512Mi }
---
apiVersion: v1
kind: Service
metadata:
name: web
spec:
selector:
app: web
ports:
- port: 80
targetPort: 8080
type: LoadBalancerApply and observe the rollout instead of assuming success:
kubectl apply -f web.yaml
kubectl rollout status deployment/web
kubectl get pods -o wide
kubectl get service web
kubectl get events --sort-by=.lastTimestampA Service of type LoadBalancer requests Azure load-balancer integration. An Ingress is normally used for path or host-based HTTP routing and needs a compatible controller. Neither replaces application health, TLS planning or network policy.
Production readiness: go beyond a successful kubectl apply
Identity and secrets
- Use Microsoft Entra integration and Kubernetes RBAC.
- Prefer workload identity for Azure resource access.
- Store secrets outside images and source control.
Reliability
- Spread replicas across nodes and zones where supported.
- Use disruption budgets and safe rolling-update settings.
- Test dependency and regional failure behavior.
Scaling
- Scale pods from measured resource or workload signals.
- Scale node pools when pending pods lack capacity.
- Validate requests before trusting autoscaling.
Networking
- Plan pod, service and subnet address capacity.
- Choose public or private API and ingress intentionally.
- Apply network policies and controlled egress.
Operations
- Collect metrics, logs, events and deployment history.
- Define supported Kubernetes upgrade windows.
- Alert on user impact, not only infrastructure use.
Data
- Keep stateless workloads disposable.
- Select storage classes and access modes deliberately.
- Test application-consistent backup and restore.
Troubleshoot AKS from symptoms to evidence
kubectl describe podImage name/tag, ACR permission, registry reachabilitykubectl describe pod POD_NAME
kubectl logs POD_NAME --previous
kubectl get deployment,replicaset,pod,service,endpoints
kubectl describe service web
kubectl top pods
kubectl get events --sort-by=.lastTimestampChange one hypothesis at a time. Scaling a broken image creates more broken replicas; opening every port hides the real network fault; increasing node size does not repair a selector mismatch.
AZ-104 decision cues for containers
- Managed Kubernetes orchestration: choose AKS when the requirement needs Kubernetes APIs, scheduling and cluster-level control.
- Image storage: choose ACR for private Azure container images and authorize pull access with an identity.
- Desired replicas and rolling updates: use a Deployment rather than creating individual pods.
- Stable pod access: use a Service; pod addresses are replaceable.
- HTTP host/path routing: evaluate an Ingress controller and Ingress rules.
- Pod demand versus node capacity: distinguish horizontal pod scaling from cluster/node-pool scaling.
- Operational evidence: use pod events, logs, metrics and Azure monitoring instead of guessing.
An application has three healthy pods, but its Service has no endpoints. Adding nodes will not help. Compare the Service selector with pod labels; a mismatch prevents the Service from selecting the pods.
Frequently asked questions
What does Azure manage in an AKS cluster?
Azure operates the managed control plane, including the Kubernetes API server, scheduler, controllers and state store. You still configure node pools, workloads, identities, networking, scaling, upgrades and application resilience according to the selected AKS mode and your design.
What is the difference between an AKS pod, Deployment and Service?
A pod is the smallest scheduled unit and runs one or more containers. A Deployment declares and maintains replicated application pods. A Service provides a stable network endpoint and selects pods by labels even when individual pod addresses change.
How does AKS pull a private image from Azure Container Registry?
The cluster identity needs permission to pull from the registry. A common setup attaches ACR to AKS or assigns the AcrPull role at the registry scope, then the pod specification references the private registry image.
Why is an AKS LoadBalancer service still pending?
First check the Service events, subnet address capacity, Azure quotas and permissions, network policy, health probes and whether the cloud load balancer finished provisioning. Pending status is a symptom; kubectl describe and Azure activity logs reveal the cause.
Is AKS part of the AZ-104 exam?
The current AZ-104 study guide includes provisioning and managing containers in the Azure portal under Azure compute. Use the official Microsoft study guide as the source of truth because objectives can change.
Official Microsoft references
Use Microsoft documentation as the authority for current behavior and exam scope: the AKS core concepts, AKS Azure CLI quickstart, AKS shared-responsibility and support policies, and the current AZ-104 study guide.
Turn this AKS guide into practical Azure administration skills.
Share your experience, target date and difficult topics. We can help you connect containers, identity, networking, monitoring and original practice into one preparation plan.