I have created private aks cluster, then I am unable to connect.
I have created VM in the hub network which has been peered to the network where the aks cluster created. the peering is working fine. but still I am unable to connect cluster from the VM.
Logs.
root@kcns-aks-jump-host:/home/azure_user# az account set --subscription 66559717-deb7-4cac-a99f-e2d2203c4987
root@kcns-aks-jump-host:/home/azure_user# az aks get-credentials --resource-group rg-kcns-aks-poc-001 --name kcns-aks-by-ado
Merged "kcns-aks-by-ado" as current context in /root/.kube/config
root@kcns-aks-jump-host:/home/azure_user# kubectl get deployments --all-namespaces=true
Error: failed to get token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/c8ecc778-3803-4184-9438-0e4a60a5edeb/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on [::1]:53: dial udp [::1]:53: socket: permission denied
E0320 14:22:24.269307 4783 memcache.go:238] couldn't get current server API group list: Get "https://kcns-aks-by-ado-dns-ioq008my.e8b851f1-9b2a-4a8f-ae9c-3d9605475c5c.privatelink.eastus.azmk8s.io:443/api?timeout=32s": getting credentials: exec: executable kubelogin failed with exit code 1
Error: failed to get token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/c8ecc778-3803-4184-9438-0e4a60a5edeb/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on [::1]:53: dial udp [::1]:53: socket: permission denied
E0320 14:22:24.329859 4783 memcache.go:238] couldn't get current server API group list: Get "https://kcns-aks-by-ado-dns-ioq008my.e8b851f1-9b2a-4a8f-ae9c-3d9605475c5c.privatelink.eastus.azmk8s.io:443/api?timeout=32s": getting credentials: exec: executable kubelogin failed with exit code 1
Error: failed to get token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/c8ecc778-3803-4184-9438-0e4a60a5edeb/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on [::1]:53: dial udp [::1]:53: socket: permission denied
E0320 14:22:24.389790 4783 memcache.go:238] couldn't get current server API group list: Get "https://kcns-aks-by-ado-dns-ioq008my.e8b851f1-9b2a-4a8f-ae9c-3d9605475c5c.privatelink.eastus.azmk8s.io:443/api?timeout=32s": getting credentials: exec: executable kubelogin failed with exit code 1
Error: failed to get token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/c8ecc778-3803-4184-9438-0e4a60a5edeb/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on [::1]:53: dial udp [::1]:53: socket: permission denied
E0320 14:22:24.449625 4783 memcache.go:238] couldn't get current server API group list: Get "https://kcns-aks-by-ado-dns-ioq008my.e8b851f1-9b2a-4a8f-ae9c-3d9605475c5c.privatelink.eastus.azmk8s.io:443/api?timeout=32s": getting credentials: exec: executable kubelogin failed with exit code 1
Error: failed to get token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/c8ecc778-3803-4184-9438-0e4a60a5edeb/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on [::1]:53: dial udp [::1]:53: socket: permission denied
E0320 14:22:24.513415 4783 memcache.go:238] couldn't get current server API group list: Get "https://kcns-aks-by-ado-dns-ioq008my.e8b851f1-9b2a-4a8f-ae9c-3d9605475c5c.privatelink.eastus.azmk8s.io:443/api?timeout=32s": getting credentials: exec: executable kubelogin failed with exit code 1
Unable to connect to the server: getting credentials: exec: executable kubelogin failed with exit code 1
root@kcns-aks-jump-host:/home/azure_user#