title: How to get admin user kubeconfig
body: <p>I am using azure aks and deployed it by using terraform module, I have executed successfully. following below documents.</p>
  
  <p><a href="https://www.hashicorp.com/blog/kubernetes-cluster-with-aks-and-terraform" rel="nofollow noreferrer">https://www.hashicorp.com/blog/kubernetes-cluster-with-aks-and-terraform</a></p>
  
  <p>But the problem is that I want to save kubeconfig of admin user.Below is the code I have written.  I am not able to get kubeconfig file of admin user.</p>
  
  <pre><code>==============================================
  
  resource "null_resource" "kubeconfig_save" {
      provisioner "local-exec" {
      command = &lt;&lt;EOT
             rm -rf /tmp/kubeconfig &amp;&amp; \
             echo "${azurerm_kubernetes_cluster.k8s.kube_config_raw}" &gt; /tmp/kubeconfig
      EOT
      }
  }
  ==================================================
  </code></pre>
  
  <p>I need kubeconfig with admin user.</p>