No internet connection
  1. Home
  2. Docker & Kubernetes

FAQ: How to Set Up KUBECONFIG on Windows

By @wisepaas.training2020-05-04 08:18:39.851Z2020-08-21 02:52:36.634Z

1. Download config file from the Management Portal

Save the config file to the .kube folder under the user's home directory %HOME%.kube.

For example: C:\Users{YourAccount}.kube.

2. Set up the system environment variable KUBECONFIG

Open System Properties. Click Environment Variables.

3. Under System Variables

If you don't see any variable called KUBECONFIG, click New to create one. If you do have the variable, select the variable and click Edit.

4. Add or append the file path of the new config file.

Note that you need to enter the exact full path for the config. %HOME% will not work for this setting.

5. Verify the new config.

Type kubectl config view. You should see the new cluster name in the output.

  • 2 replies
  1. Danielle Watson @watdaniel2020-06-04 12:38:11.421Z

    Hello, Thanks a lot for this explenation

    1. N
      Arthur Nigma @NigmaJR2020-12-11 16:06:31.608Z

      Unfortunately your tips didn't help me. So I provide PS command for merging configs in Win10.
      PS ~\.kube> $Env:KUBECONFIG=("%Path to first config%\config1;%Path to second config%\config2") PS ~\.kube> kubectl config view --merge --flatten | Out-File "%Path where your merged config will be placed%\new_config"

      1. Progress
        with doing this idea
      2. @wisepaas.trainingpinned this topic 2021-04-28 07:14:55.275Z.