title: Clarification on using K8s API server URL in Azure
body: <p>I have a Kubernetes cluster in Azure Kubernetes Service (AKS). I am writing a client program to retrieve the pods list in this cluster using the Kubernetes REST API. This client program will also be running inside the cluster in future. For the purpose of calling the REST API, I created a service account in K8s with proper role binding. It generated a secret with token and CA cert. My azure K8s cluser API server URL is provided as <code>https://k8s-test-cluster-dns-6ez1sc47.hcp.centralus.azmk8s.io</code> in the portal. To access the API server, I need to provide both token and CA cert file to avoid SSL issues. But in the Azure portal, when I view the cluster workloads, the browser sends a request to  <code>https://k8s-test-cluster-dns-6ez1sc47.portal.hcp.centralus.azmk8s.io</code>. (Note the extra <strong>portal</strong> after the cluster name). If I use this Server URL directly, I do not have to use the CA crt because the URL has a cert signed by Microsoft. I just have to pass the token.</p>
  <p>My Question is whether it is advisable to use the second URL instead of the actual cluster API Server URL. Will there any limitations in future?</p>