Configure kubectl to connect to Kubernetes Sandbox
To configure a locally-installed copy of kubectl to connect to the Kubernetes Sandbox, follow these steps:
-
Download the /etc/kubernetes/admin.conf file to your local system.
-
Edit the downloaded file and update the server variable to reflect the public IP address of the running Bitnami Kubernetes Sandbox instance.
... - cluster server: https://SERVER-IP:6443 ...
-
Move the downloaded file to ~/.kube/sandbox.conf:
$ sudo mv admin.conf ~/.kube/sandbox.conf
-
Set the KUBECONFIG environment variable to reflect the new configuration file:
$ export KUBECONFIG=~/.kube/sandbox.conf
Your locally installed copy of kubectl should now be configured to use the Bitnami Kubernetes Sandbox. Verify this by executing kubectl cluster-info and checking the output.