Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Clusters and work nodes - How do I set KUBECONFIG variable in Windows 10?

Tags:

ibm-cloud

I using following link to create : https://console.bluemix.net/docs/containers/cs_tutorials.html#cs_cluster_tutorial

In Lesson3, Step 3 "Verify that the KUBECONFIG environment variable is set properly.", I am unable to set the variable KUBECONFIG.

I am able to execute the following command: ibmcloud ks cluster-config clusternameabc

I am getting following message The configuration for clusternameabc was downloaded successfully. Export environment variables to start using Kubernetes, with the following message:

SET KUBECONFIG=C:\Users\AAA.bluemix\plugins\container-service\clusters\customernameabc\kube-config-hou02-clusternameabc.yml

When I run the above SET command in powershell, I just get the prompt back with environment variable not set.

When I do

$Env:KUBECONFIG=C:\Users\AAA.bluemix\plugins\container-service\clusters\customernameabc\kube-config-hou02-clusternameabc.yml

Notepad gets opened and this file is shown. I want to just set the environment variable and unable to. Can someone please tell me what I am doing wrong? I tried searching and could not find answers and IBM documentation has only Mac examples.

like image 447
harihari Avatar asked Oct 17 '25 06:10

harihari


1 Answers

In Powershell

1) $env:KUBECONFIG = "C:\Users\AAA.bluemix\plugins\container-service\clusters\customernameabc\kube-config-hou02-clusternameabc.yml"

2) ls env:KUBECONFIG

Slightly easier to remember.

like image 53
Robert Stephenson Avatar answered Oct 24 '25 07:10

Robert Stephenson