How to Configure IBM Kubernetes CLI on Windows

5/20/2019

How to configure IBM kubernetes CLI? I am receiving error when I export the environment variable of mycluster

SET KUBECONFIG=C:\Users\myname\.bluemix\plugins\container-service\clusters\mycluster\kube-config-hou02-mycluster.yml

When I executed the command below,

export KUBECONFIG=C:\users\myname\.bluemix\plugins\container-service\clusters\mycluster\kube-config-hou02-mycluster.yml

I receive error below.

export : The term 'export' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ export KUBECONFIG=C:\users\myname\.bluemix\plugins\container-service ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (export:String) [], CommandNotF
   oundException
    + FullyQualifiedErrorId : CommandNotFoundException
-- jim
ibm-cloud
kubernetes
powershell
windows

2 Answers

5/21/2019

We recently tried SETting Kubernetes environment variable on Windows 10 for a lab and it worked as expected. You can follow the step-by-step instructions here

-- Vidyasagar Machupalli
Source: StackOverflow

5/20/2019

When setting up the Kubernetes CLI, there are special instructions for Windows environments:

Windows PowerShell users: Instead of copying and pasting the SET command from the output of ibmcloud ks cluster-config, you must set the KUBECONFIG environment variable by running, for example, $env:KUBECONFIG = "C:\Users\.bluemix\plugins\container-service\clusters\mycluster\kube-config-prod-dal10-mycluster.yml".

-- data_henrik
Source: StackOverflow