This short guide will show you how to access your Kubernetes Cluster from an External Ubuntu Desktop machine.
The first step will be to install the necessary packages to connect to your cluster (kubectl)
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >> /etc/apt/sources.list.d/kubernetes.list apt-get update apt-get install -y kubectl
Copying Kubernetes Config from Master:
The next step will be to copy your Kubernetes config from your Kubernetes Master server. SSH to your master and cat the config file.
Now, create the directory .kube in your home directory and paste in the content from the master server into a file there named config
mkdir ~/.kube nano ~/.kube/config
You should now be able to access your cluster and run standard kubectl commands, to test this has worked – Run the below to list your connected nodes:
kubectl get nodes