Skip to content

Latest commit

 

History

History
69 lines (41 loc) · 1.72 KB

File metadata and controls

69 lines (41 loc) · 1.72 KB

Create a Kubeconfig file using admin access

aks/create-kube-config/README.md

Note for production environments we recommend you configure RBAC to
limit access to your Kubernetes cluster based on roles.

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Deploy an Azure Kubernetes Service cluster

Create a Kubeconfig file usin admin access

To create the Kubeconfig file use the following command line:

  az aks get-credentials --resource-group $RESOURCE_GROUP --name $AKS --admin --file config

Once the command completes the Kubeconfig file is stored in a file named config

Setting the KUBECONFIG environment variable

Set the KUBECONFIG environment variable using the command line below:

  export KUBECONFIG=$PWD/config

Cleanup

Do NOT forget to remove the resources once you are done with the example.

Reference documentation

1m