Forum Topic

Thanks for your participation and contribution.


Back to Azure

AKS Troubleshooting

Post a reply
772 views
i90runner
i90runner

AKS AAD enabled kubectl: error: You must be logged in to the server (Unauthorized) I have AKS cluster (1.21.7) with aad enabled and since couple of days I get following error from kubectl

$ kubectl get nodes
error: You must be logged in to the server (Unauthorized)
az login
az account set --subscription <subscription>
az aks get-credentials --resource-group <group name> --name <aks name>
kubectl get nodes

however, if I load credentials with admin parameter everything works fine.

az aks get-credentials --resource-group <group name> --name <aks name> --admin
i90runner
i90runner

To see kubelet logs

https://docs.microsoft.com/en-us/azure/aks/kubelet-logs.

https://docs.microsoft.com/en-us/azure/aks/ssh.


kubectl debug node/aks-devdefault-1012885-vmss000008u -it --image=mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11

## To see kubelet logs
chroot /host
journalctl -u kubelet -o cat

Last updated

i90runner
i90runner

Troubleshooting Storage PV and PVC

https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/fail-to-mount-azure-file-share.

Warning Failed 10s kubelet Error: failed to generate container "795f9f4440eafb3628bb9516d77e655490844d02b68675114b9272953dd25638" spec: failed to generate spec: failed to stat "/var/lib/kubelet/pods/2fa47ed7-65bb-4047-89fd-8aa56a32ec01/volumes/kubernetes.io~csi/-kubernetes-/mount": stat /var/lib/kubelet/pods/2fa47ed7-65bb-4047-89fd-8aa56a32ec01/volumes/kubernetes.io~csi//mount: host is down

Last updated

1-3 of 3

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.