2

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!

JohanSellberg
  • 2,423
  • 1
  • 21
  • 28

1 Answers1

3

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.

Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
  • Could you check your `az --version` version? My version is `2.0.2`. It works for me. – Shui shengbao Apr 14 '17 at 08:07
  • There have been a bit of a paus in the project so have not had the time to check yet. Promise I will check and if I get good information to continue accept the answer otherwise give feedback on the result. – JohanSellberg Apr 20 '17 at 08:59
  • I had version 2.0.0 of the Azure CLI. After upgrading python (ran into some pip problems) and az to latest (2.0.3) I got rid of the above problem in this question. I have after that ran into some connection timeout issues but that is most likely due to some firewall restrictions so not related. @Walter Pls add the azure cli version to the answer and I will accept. – JohanSellberg Apr 25 '17 at 11:49
  • OK. I have added it to answer. – Shui shengbao Apr 25 '17 at 11:58