Report this

What is the reason for this report?

Can I configure DO kubernetes on my DO server?

Posted on June 16, 2020

I have setup a DO server and a Kubernetes.I have kubectl and doctl downloaded and the config file in in place. However, when I try: kubectl cluster-info I always get an error stating that connection to localhost:8080 was refused. Can anybody sort me out?



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!

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.
0

Accepted Answer

Hi there @RSrsRsrS,

Yes, this is doable, I have the same setup at my end as well.

You could either use the doctl command to save your Kubernetes configuration file:

  1. doctl kubernetes cluster kubeconfig save use_your_cluster_name

This downloads the kubeconfig for the cluster, merge it with any existing configuration from ~/.kube/config, and automatically handles the authentication token or certificate.

Another option would be to manually download the config file via your DigitalOcean control panel and upload it to your Droplet. Then you could use the following command to interact with the Kubernetes API:

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

For more information I would recommend taking a look at the official documentation here:

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

Hope that this helps! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.