AKS Deployments & Troubleshooting
Manifests with kubectl apply · node pools · Services and ingress · ACR pull · scaling · events and logs · egress and Container Apps troubleshooting
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Deploy with manifest files
A Kubernetes manifest file defines a cluster's desired state, such as which container images to run. You deploy it with kubectl apply and the name of your YAML manifest.
| Step | Command or setting |
|---|---|
| Download credentials and configure kubectl | az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME |
| Add a user mode node pool | az aks nodepool add with --mode User |
| Deploy the manifest | kubectl apply -f aks-store-quickstart.yaml |
| Select the user node pool in the pod template | kubernetes.azure.com/mode: user in the nodeSelector |
| Check where the pods run | kubectl get pods -o wide |
| Watch a Service get its public IP | kubectl get service store-front --watch |
- Applications should run on user mode node pools instead of the default system mode node pool.
- To run your own images from Azure Container Registry, update the
imageproperty in the manifest to include your ACR login server name. - Make sure the application pods show a
Runningstatus before you continue. - When you create a new cluster, AKS automatically creates a second resource group to store the AKS resources.
az aks createdefaults to three nodes if you don't specify a node count.
Cluster building blocks
| Item | What the page says |
|---|---|
| System node pool | Hosts critical system pods, such as CoreDNS and konnectivity-agent |
| User node pool | Hosts your application pods |
| Pod | A group of one or more containers that share the same network and storage resources |
default namespace | Lets you start using cluster resources without creating a new namespace |
kube-system namespace | Used by Kubernetes to manage cluster resources; Microsoft doesn't recommend deploying your own applications to it |
| Control plane (Azure-managed) | kube-apiserver, etcd, kube-scheduler, kube-controller-manager, cloud-controller-manager |
| On every node | kubelet, kube-proxy or Cilium, and a container runtime |
| Pricing tier | Nodes | Note |
|---|---|---|
| Free | Up to 1,000 | No financially backed uptime SLA |
| Standard | Up to 5,000 | Uptime SLA enabled by default |
| Premium | - | Adds Microsoft maintenance beyond community support |
Linux node pools use containerd on Kubernetes version 1.19 and higher.
Services and ingress
| Service type | What it creates |
|---|---|
| ClusterIP | An internal IP address for use within the cluster; the default when you don't specify a type |
| NodePort | A port mapping on the underlying node, reached with the node IP address and port |
| LoadBalancer | An Azure load balancer resource with an external IP address, connected to the pods through the backend pool |
| ExternalName | A specific DNS entry for easier application access |
- Internal load balancers are only assigned a private IP address, so they can't be accessed from the Internet.
- Ingress controllers operate at layer 7 and can route HTTP traffic to different applications based on the inbound URL.
- A
LoadBalancerService works at layer 4. Layer 4 services are unaware of the actual applications and can't implement complex routing rules.
Pull images and scale
- The AKS to ACR integration (
--attach-acrin Azure CLI) assigns theAcrPullrole to the Microsoft Entra managed identity associated with the agent pool. - For a private external registry, use an image pull secret instead.
- To use the horizontal pod autoscaler, all containers must have defined CPU requests and limits, and pods must have specified requests.
- The tutorial autoscaler is a
HorizontalPodAutoscalerwithaverageUtilization: 50,minReplicas: 3andmaxReplicas: 10; check it withkubectl get hpa. - Manual scaling:
kubectl scale --replicas=5 deployment.apps/store-frontfor pods andaz aks scale --resource-group myResourceGroup --name myAKSCluster --node-count 5for nodes.
Logs, events and node health
| Need | Use |
|---|---|
| All events in the cluster | kubectl get events |
| Events in one namespace | kubectl get events --namespace default |
| Events of one pod | kubectl describe pod with the pod name |
| Conditions and events of a node | kubectl describe node |
| Events in the portal | Kubernetes resources > Events |
| Events for more than one hour | Enable Container insights |
| Container logs, events and pod metrics in real time | Live data in Container insights (needs Container insights enabled and uses direct Kubernetes API access) |
| Container logs on the node | /var/log/containers |
- Events are only available for one hour after they are generated, because there is no retention mechanism.
- Warning events signal potentially problematic situations. Normal events represent routine operations.
- Node Problem Detector generates events and/or node conditions. Node conditions indicate a permanent problem that makes the node unavailable.
- The recommended Container insights schema for container logs is
ContainerLogV2; its fields include ContainerName, PodName and PodNamespace.
Connectivity and Container Apps troubleshooting
Traffic that starts in a pod or a worker node is outbound traffic from the cluster. For a destination on the internet, the default method is to send the traffic through the Azure Load Balancer. Microsoft's egress checklist includes these steps in this order:
- Check whether Azure network resources block the traffic with Azure Virtual Network Verifier (Preview).
- Check that DNS resolution for the endpoint works correctly.
- Make sure that you can reach the endpoint through an IP address.
- Make sure that you can reach the endpoint from another source.
- Make sure that the endpoint is working.
- Check whether the cluster can reach any other external endpoint.
- Check whether a network policy is blocking the traffic.
- Check whether an NSG is blocking the traffic.
- Check whether a firewall or proxy is blocking the traffic.
- Check whether the AKS service principal or managed identity has the required AKS service permissions to make the network changes to Azure resources.
- To identify a problematic hop, check the HTTP response codes before and after it. If nothing is conclusive, take packet captures from the client and server.
| Container Apps symptom | Action in the troubleshooting guide |
|---|---|
| Revision takes more than 10 minutes and ends Degraded (Deployment Progress Deadline Exceeded) | Verify health probes are configured correctly |
| Error deploying a new revision | Verify Container Apps can pull your container image |
| Endpoint doesn't respond to requests | Review ingress configuration |
| Requests return status 403 | Verify networking configuration is correct |
| Missing parameters error in az containerapp | Verify the latest version of the Azure Container Apps extension is installed |
| Container Apps log type | Source | Table or note |
|---|---|---|
| Console logs | Your application (stdout and stderr) | ContainerAppConsoleLogs_CL |
| System logs | The Container Apps service | ContainerAppSystemLogs_CL |
| HTTP logs | The ingress layer, when HTTP logging is enabled through diagnostic settings | ContainerAppHTTPLogs schema |
In the portal, open Monitoring > Log stream (not Logs). If it says the revision is scaled to zero, deploy a new revision scaled to a minimum replica count of 1.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Download credentials and configure kubectl | az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME | - |
| Add a user mode node pool | az aks nodepool add --resource-group $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --name $USER_NP --node-count 1 --mode User | - |
| Deploy a manifest | kubectl apply -f aks-store-quickstart.yaml | - |
| Verify pods run on a user node pool | kubectl get pods -o wide | - |
| Scale pods manually | kubectl scale --replicas=5 deployment.apps/store-front | - |
| Scale nodes manually | az aks scale --resource-group myResourceGroup --name myAKSCluster --node-count 5 | - |
| Check the autoscaler | kubectl get hpa | - |
| List all events | kubectl get events | - |
| List events in one namespace | kubectl get events --namespace default | - |
| Check node conditions and events | kubectl describe node my-aks-node | - |
Exam Tips
Tick each tip once you can answer it without looking.
“Create the objects that a YAML manifest describes” → kubectl apply -f <manifest>.yaml. Trap: kubectl scale only changes replicas; az aks get-credentials only configures kubectl.
“Application pods must run on a user node pool” → nodeSelector kubernetes.azure.com/mode: user. Trap: System node pools host critical system pods such as CoreDNS.
“Service type when none is specified” → ClusterIP (internal IP, inside the cluster). Trap: LoadBalancer gets an external IP and an Azure load balancer; it is not the default.
“Service that creates an Azure load balancer with an external IP” → LoadBalancer. Trap: NodePort maps a port on the node IP; ExternalName only creates a DNS entry.
“Route to different microservices by URL path” → An ingress controller (layer 7). Trap: A LoadBalancer Service is layer 4 and can't implement complex routing rules.
“Let AKS pull from your Azure Container Registry” → --attach-acr: grants AcrPull to the agent pool managed identity. Trap: A private external registry needs an image pull secret instead.
“Pods must pull from a private non-ACR registry” → Image pull secret. Trap: --attach-acr covers only the AKS to ACR integration.
“Horizontal pod autoscaler does not scale” → Check that every container defines CPU requests and limits and that pods have requests. Trap: The tutorial states this as a requirement for using the horizontal pod autoscaler.
“Look at the events of one failing pod” → kubectl describe pod <pod-name>. Trap: kubectl get events lists the whole cluster.
“Keep Kubernetes events longer than one hour” → Enable Container insights. Trap: Events have no retention mechanism and are available for only one hour.
“Node shows a permanent problem” → Node Problem Detector node conditions; check with kubectl describe node. Trap: Node conditions are exposed by Node Problem Detector; check them with kubectl describe node.
“Outbound call from a pod fails” → Check DNS, then IP reachability, then another source, then network policy and NSG. Trap: Don't start with packet captures; they are for when other steps are inconclusive.
“Container Apps revision Degraded after more than 10 minutes” → Verify health probes. Trap: Ingress review is for endpoints that don't respond; 403 points to networking configuration.
“Query stdout and stderr of Container Apps containers” → ContainerAppConsoleLogs_CL. Trap: ContainerAppSystemLogs_CL holds service-level events from the platform.
“Container Apps Log stream says the revision is scaled to zero” → Deploy a new revision with a minimum replica count of 1. Trap: Open Log stream, not Logs.
Sources
- Deploy an AKS cluster by using Azure CLI
- AKS core concepts
- Tutorial: Deploy an application to AKS
- Tutorial: Scale applications in AKS
- Services in AKS
- Ingress networking in AKS
- Integrate Azure Container Registry with AKS
- Use Kubernetes events for troubleshooting
- Monitor AKS
- Node Problem Detector in AKS
- Troubleshoot AKS outbound connections
- Troubleshooting in Azure Container Apps
- Monitor logs in Azure Container Apps with Log Analytics
Checked against Microsoft Learn on November 13, 2026.