JohanSellberg
JohanSellberg

Reputation: 2503

Unable to connect with Azure Container Services - Kubernetes

I am working on setting up environment for deploying microservices.

I have gotten as far as building my code and deploying to a registry but having problem running it in Azure Container Services.

I am following this guide to connect to ACS: https://learn.microsoft.com/en-us/azure/container-service/container-service-connect

But i fail on the step: Download Cluster Credentials Using the given command

az acs kubernetes get-credentials --resource-group=<cluster-resource-group> --name=<cluster-name>

Ofc changing the reseource group and clustername to the correct names from my portal. I get an error:

[WinError 10049] The requested address is not valid in its context

(if i change resource group or clustername to something else I get other errors so seems it can find those at least)

When i try to search for the error it seems to be some IP adress problem but can't figure out what to do. Tried running same command from other network (from home) to make sure work firewall is not blocking something.. but I get the same error

Any help appriciated!

Upvotes: 2

Views: 844

Answers (1)

Shui shengbao
Shui shengbao

Reputation: 19195

This command copy the cluster credentials to your machine. Background processes are ssh to your cluster VM and copy the credentials.

So, you should ensure you could ssh to the master VM manual. If you could not ssh to master VM manual, az command also could not do it. You could get your master-dns-name on Azure Portal.

ssh -i id_rsa <user>@<master-dns-name>

Notes: If az command does not work and you could ssh to master VM, you could download credentials to your machine. They are same. You could check your link about this.

You also need check your azure cli version. You could use the following commands

az --version

My version is 2.02. It works for me.

Upvotes: 3

Related Questions