profile for Gajendra D Ambi on Stack Exchange, a network of free, community-driven Q&A sites

Thursday, March 7, 2019

Accessing kubernetes from your windows machine

Recently I had to install, configure and get one ICP [IBM Cloud Platform] with ICAM [IBM Cloud Automation manager] ready for a client.
Many of us who were setting this development environment for the client had windows and as you know windows is the last choice of most if not all developer but most get that as a standard issue.
So ICP is IBMs container platform which is a sophisticated enterprise ready kubernetes platform with all the bells, whistles and with batteries included.
So where when or If I say ICP or kubernetes or k8s then think any one of them since it is the same method for all.

  1. Locate the .kube directory on your k8s machine.
    • On linux/Unix it will be at /root/.kube
    • On windows it will be at C:/User/<username>/.kube  
  2.  copy the config file from the .kube folder of the k8s cluster to .kube folder of your local machine
  3. Copy 
    • client-certificate: /etc/cfc/conf/kubecfg.crt
    • client-key: /etc/cfc/conf/kubecfg.key
      to .kube folder of your local machine.
  4. Edit the config file in the .kube folder of your local machine and update the path of the kubecfg.crt and kubecfg.key on your local machine.
    • /etc/cfc/conf/kubecfg.crt --> C:\Users\<username>\.kube\kubecfg.crt
    • /etc/cfc/conf/kubecfg.key --> C:\Users\<username>\.kube\kubecfg.key
Now you should be able to interact with the cluster. Run 'kubectl get pods' and you will see the pods on the k8s cluster.