Get Access to Kubernetes Cluster
You can either SSH to one of the created control plane instance(s) and use the /etc/kubernetes/admin.conf
or if you want to
have access to your Kubernetes cluster locally, follow these steps.
Prerequisites
Make sure that you have following tools installed locally:
Make sure that you have environment variables set for accessing your cloud provider API.
2. Prepare SSH Agent with SSH Key
KubeOne requires SSH access to your instances, see documentation for more details.
cd kubeone
eval `ssh-agent`
ssh-add ~/.ssh/k8s_rsa
3. Use KubeOne to retrieve kubeconfig
kubeone kubeconfig -m kubeone.yaml -t ../terraform/<provider>/output.json > kubeconfig
export KUBECONFIG=`pwd`/kubeconfig
kubectl get nodes
Now you should see details of your control plane and worker nodes.