After migrating to latest version(0.0.24) of kubelogin, I am facing issue connecting to Azure Kubernetes using SPN #162
Unanswered
ChaitanyaGollamudi
asked this question in
Q&A
Replies: 1 comment
-
|
i think your tenant ID is getting overidden by some bad value. check |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sample kube config used to:
apiVersion: v1
clusters:
insecure-skip-tls-verify: true
server: https://172.25.160.196:443
name: pep-eiap-nonprod-eus-global-01-aks
contexts:
cluster: pep-eiap-nonprod-eus-global-01-aks
user: pep-eiap-svc-user-sp
name: pep-eiap-nonprod-eus-global-01-aks-context
current-context: pep-eiap-nonprod-eus-global-01-aks-context
kind: Config
preferences: {}
users:
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- get-token
- --environment
- AzurePublicCloud
- --server-id
- 6dae42f8-4368-4678-94ff-3960e28e3630
- --tenant-id
- 42cc3295-cd0e-449c-b98e-5ce5b560c1d3
- --login
- spn
command: kubelogin
env: null
Issue I am facing:
/usr/local/bin/kubectl apply -n pep-eiap-global-services-dev -f /azp/agent/_work/1/s/deployment.yml
Error: failed to get token: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"AADSTS900023: Specified tenant identifier 'ndjjyzmyotuty2qwzs00ndljlwi5ogutnwnlnwi1njbjmwqz' is neither a valid DNS name, nor a valid external domain.\r\nTrace ID: a24a4649-c5b3-4bde-8f86-8c6e6b5c0800\r\nCorrelation ID: f3b3c1f1-9831-4572-9f80-4fc678a64c8f\r\nTimestamp: 2022-11-25 05:06:29Z","error_codes":[900023],"timestamp":"2022-11-25 05:06:29Z","trace_id":"a24a4649-c5b3-4bde-8f86-8c6e6b5c0800","correlation_id":"f3b3c1f1-9831-4572-9f80-4fc678a64c8f","error_uri":"https://login.microsoftonline.com/error?code=900023"} Endpoint https://login.microsoftonline.com/NDJjYzMyOTUtY2QwZS00NDljLWI5OGUtNWNlNWI1NjBjMWQz/oauth2/token
Unable to connect to the server: getting credentials: exec: executable kubelogin failed with exit code 1
##[error]Error: failed to get token: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"AADSTS900023: Specified tenant identifier 'ndjjyzmyotuty2qwzs00ndljlwi5ogutnwnlnwi1njbjmwqz' is neither a valid DNS name, nor a valid external domain.\r\nTrace ID: a24a4649-c5b3-4bde-8f86-8c6e6b5c0800\r\nCorrelation ID: f3b3c1f1-9831-4572-9f80-4fc678a64c8f\r\nTimestamp: 2022-11-25 05:06:29Z","error_codes":[900023],"timestamp":"2022-11-25 05:06:29Z","trace_id":"a24a4649-c5b3-4bde-8f86-8c6e6b5c0800","correlation_id":"f3b3c1f1-9831-4572-9f80-4fc678a64c8f","error_uri":"https://login.microsoftonline.com/error?code=900023"} Endpoint https://login.microsoftonline.com/NDJjYzMyOTUtY2QwZS00NDljLWI5OGUtNWNlNWI1NjBjMWQz/oauth2/token
##[error]Unable to connect to the server: getting credentials: exec: executable kubelogin failed with exit code 1
commandOutput
##[error]The process '/usr/local/bin/kubectl' failed with exit code 1
Beta Was this translation helpful? Give feedback.
All reactions