How do I troubleshoot AKS or GKE?

How to troubleshoot Azure AKS and Google GKE clusters: kubectl access, node and node pool checks, node shells, built-in diagnostics and what changes on GKE Autopilot.

How do I troubleshoot AKS or GKE?

Start with the kubectl checks you would run on any cluster: nodes, pods, events and logs. Then use the cloud's own tools for what kubectl cannot see. On AKS that is Diagnose and solve problems in the Azure portal and on GKE it is the troubleshooting pages and Cloud Logging in the Google Cloud console.

Most incidents on AKS and GKE are Kubernetes problems first. CrashLoopBackOff, OOMKilled and Pending pods look the same on any cloud. The cloud matters when the cause sits under the cluster: node pools, networking, identity or a stopped cluster.

The checks that work on any cluster

kubectl get nodes -o wide
kubectl get pods -A --field-selector=status.phase!=Running
kubectl describe pod <pod-name> -n <namespace>
kubectl logs <pod-name> -n <namespace> --previous
kubectl get events -n <namespace> --sort-by=.lastTimestamp

The events and the previous container's logs answer most questions. Our error pages go deeper on CrashLoopBackOff, Pending pods, Node NotReady and DNS resolution.

AKS troubleshooting

Get access and check the cluster

az aks get-credentials --resource-group <resource-group> --name <cluster-name>

az aks show --resource-group <resource-group> --name <cluster-name>

az aks nodepool list --resource-group <resource-group> --cluster-name <cluster-name> --output table

az aks show returns the cluster's provisioning state and power state. A stopped AKS cluster has no running nodes, so kubectl calls fail even though the cluster still exists.

Use Diagnose and solve problems

In the Azure portal, open the cluster and choose Diagnose and solve problems. Pick a category such as Connectivity Issues. Each finding gives an issue summary, error details, recommended actions, related metrics and logging data. Microsoft says it needs no extra configuration or billing cost.

Get a shell on an AKS node

AKS nodes are not exposed to the internet. Microsoft documents kubectl debug, which runs a privileged container on the node.

kubectl debug node/<node-name> -it --image=mcr.microsoft.com/azurelinux/busybox:1.36

# Inside the debug container, switch to the node's file system
chroot /host

# When you are done, delete the debug pod
kubectl delete pod <node-debugger-pod-name>

If you cannot reach the Kubernetes API, az aks machine list gives the private IP addresses of the nodes in a pool. You then need to be inside the cluster's virtual network to SSH to them.

az aks machine list --resource-group <resource-group> --cluster-name <cluster-name> --nodepool-name <nodepool-name> --output table

GKE troubleshooting

Get access and check the cluster

# kubectl needs this plugin to authenticate to GKE
gke-gcloud-auth-plugin --version

gcloud container clusters get-credentials <cluster-name> --location=<location>

gcloud container clusters describe <cluster-name> --location=<location>

gcloud container node-pools list --cluster=<cluster-name> --location=<location>

The location is a region for a regional cluster or a zone for a zonal one. If the plugin is missing, install it with gcloud components install gke-gcloud-auth-plugin.

Use the console and Cloud Logging

Google's GKE troubleshooting docs cover cluster setup, NotReady nodes, autoscaling, storage, security, workloads, upgrades and monitoring. The Google Cloud console shows cluster and workload health. Cloud Logging keeps the history, which helps when the pod that failed is already gone.

Autopilot vs Standard

On GKE Autopilot, Google runs the nodes. You debug pods, events and logs as usual, but node pool settings and node level fixes are not yours to change. On GKE Standard, you own the node pools and can debug nodes like on any other cluster.

What is the same on both

  • Check identity first. Most "forbidden" errors are a mapping between the cloud identity and Kubernetes RBAC.
  • Check node pools before pods. A pool at its maximum size or out of quota explains a lot of Pending pods.
  • Read events before logs. Events say what Kubernetes did. Logs say what the app did.
  • Look at what changed. A recent deploy, upgrade or config change is the most common trigger.

Where KubeGraf fits

KubeGraf runs on EKS, GKE, AKS, k3s, RKE2 and OpenShift, so one investigation flow covers all of them. Specialist agents pull the logs, events, metrics, workloads and recent deploys for the failing workload into one view. Agents propose competing explanations and cite the evidence behind each one. Nothing changes without approval from a person or a policy you set. See Kubernetes incident response.

Also on AWS? See How do I troubleshoot EKS?.

Sources

Read on 23 November 2026. Cloud products change often, so check the source before you rely on a detail.

Frequently asked questions

How do I get kubectl access to an AKS cluster?

Run az aks get-credentials with your resource group and cluster name. It merges the cluster's credentials into your kubeconfig. Then check access with kubectl get nodes.

How do I get kubectl access to a GKE cluster?

Run gcloud container clusters get-credentials with the cluster name and its location. You also need the gke-gcloud-auth-plugin installed, or kubectl cannot authenticate.

How do I get a shell on an AKS node?

AKS nodes are not exposed to the internet. Microsoft documents kubectl debug node with a privileged container. Run chroot /host inside it to work on the node itself.

Does AKS Diagnose and solve problems cost extra?

No. Microsoft says it needs no extra configuration or billing cost. You open it from your cluster's page in the Azure portal.

What is different about GKE troubleshooting on Autopilot?

On Autopilot, Google runs the nodes for you. You still debug pods, events and logs with kubectl, but node level fixes are not yours to make.

Want to see it on one of your own clusters? Apply for KubeGraf Freemium. It runs for three calendar months by approval, with no card and no automatic paid conversion.

Last updated . Try KubeGraf Freemium.