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

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:

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:

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