title: "Authorized IP ranges should be defined on Kubernetes Services" blocks deployment pipeline
body: <p>One of the security warnings I have in Azure Advisor is:</p>
  <blockquote>
  <p>Authorized IP ranges should be defined on Kubernetes Services</p>
  <p>Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster.</p>
  </blockquote>
  <p>Can read all about it here:</p>
  <p><a href="https://docs.microsoft.com/en-us/azure/aks/api-server-authorized-ip-ranges" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/aks/api-server-authorized-ip-ranges</a></p>
  <p>The command to update an existing AKS cluster is the following:</p>
  <pre><code>az aks update \
      --resource-group myResourceGroup \
      --name myAKSCluster \
      --api-server-authorized-ip-ranges  73.140.245.0/24
  </code></pre>
  <p>Or to remove any:</p>
  <pre><code>az aks update \
      --resource-group myResourceGroup \
      --name myAKSCluster \
      --api-server-authorized-ip-ranges &quot;&quot;
  </code></pre>
  <p>Anyway, with this enabled, my deployment pipeline timesout because it can't connect to AKS. I've added the IP address that pops when it says it can't connect and still isn't able to connect.</p>
  <p>So basically I'm relegated to removing the IP ranges when I need to run the pipeline and then adding it back on when it is done. Obviously not an ideal way of handling this.</p>
  <p>How should I resolve this and does Azure have a more elegant way of whitelisting the IP from the pipeline in AKS?</p>