<p>I am working on setting up environment for deploying microservices.</p>

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

<p>I am following this guide to connect to ACS: <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-connect" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/container-service/container-service-connect</a> </p>

<p>But i fail on the step: Download Cluster Credentials
Using the given command</p>

<pre><code>az acs kubernetes get-credentials --resource-group=&lt;cluster-resource-group&gt; --name=&lt;cluster-name&gt;
</code></pre>

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

<pre><code>[WinError 10049] The requested address is not valid in its context
</code></pre>

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

<p>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</p>

<p>Any help appriciated!</p>

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

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

<pre><code>ssh -i id_rsa &lt;user&gt;@&lt;master-dns-name&gt;
</code></pre>

<p>Notes: If <code>az</code> 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 <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-connect#connect-to-a-kubernetes-cluster" rel="nofollow noreferrer">link</a> about this.</p>

<p>You also need check your azure cli version. You could use the following commands</p>

<pre><code>az --version
</code></pre>

<p>My version is 2.02. It works for me.</p>
