Question

Setting up Kubernetes | How do I connect to Kubectl and DigitalOcean command line tool?

Posted February 26, 2020 174 views
WordPressControl PanelsKubernetes

Hey together,
i am a beginner and already have some experience with cloud servers and wordpress.
Now I would like to install Wordpress on a DigitalOcean Kubernetes cluster.

Unfortunately I don’t know how to install Kubectl and I don’t know how to use the DigitalOcean command line tool.

I have a MacBook and currently no Kubernetes cluster.
Do I need to install Kubectl locally on my MacBook? How do I connect to the Kubernetes cluster from DigitalOcean?

Many thanks to all help!

best
Jonas

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @jonashartmann,

Yes you will need kubectl installed locally on your Mac. Here is a link to the official documentation on how you can do that for Mac:

https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-macos

After that you can download your Kubernetes Cluster config from your DigitalOcean Control Panel directly rather than using the doctl command-line tool. You can see the exact steps as described here in the official DigitalOcean documentation:

https://www.digitalocean.com/docs/kubernetes/how-to/connect-to-cluster/#download

Once you have the config file downloaded, you can run the following command to interact with the Kubernetes Cluster:

kubectl --kubeconfig="use_your_kubeconfig.yaml" get nodes

Hope that this helps!
Let me know if you have any questions.
Regards,
Bobby

Submit an Answer