I couldn't be able to connect private aks cluster

Saravanan Krishnan 40 Reputation points
2023-03-20T14:24:40.4933333+00:00

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#

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
470 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,877 questions
{count} votes

Accepted answer
  1. Adrian Dobrescu 261 Reputation points Microsoft Employee
    2023-03-20T14:37:44.62+00:00

    Hello @Saravanan Krishnan ,

    Thank you for reaching Microsoft Q&A,

    You might have hit an issue with either kubelogin version as it's explained in this public issue:

    https://stackoverflow.com/questions/74702519/executable-kubelogin-failed-with-exit-code-1

    You may try to follow those steps and see if it helps.

    Please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.

    Thank you!

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful