kubectl: Unable to connect to the server: i/o timeout

Hi! yesterday I set up a kubernetes cluster on DigitalOcean and today I ran the following steps:

$doctl kubernetes cluster kubeconfig save fyx-cluster
$kubectl config current-context
(prints cluster name)
$kubectl apply -f gitlab-admin-service-account.yaml
Unable to connect to the server: dial tcp <IP address>:443: i/o timeout

I run the last command repeatedly, same error.

Now, 10 minutes later, the same command succeeds:

$kubectl apply -f gitlab-admin-service-account.yaml
serviceaccount/gitlab-admin created created

Is there a way I can avoid these timeouts in the future?

Show comments

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.

I have same problem today. When I woke up today, my container (application) was broken. Redeploy container failed and sometimes I got same error:

Unable to connect to the server: dial tcp <IP address>:443: i/o timeout

After recycle pod in node pools the problem persists.

This comment has been deleted

Hello, I have the same issue and its happen sporadically. Actually i have 4 kubernetes cluster and I found that the issue are appearing only to one. The only differences is that its the development version and we have a lot of kubernete’s jobs but from the digital ocean reports looks ok. The current status is that is down ( kubernetes access url:

Unable to connect to the server: dial tcp i/o timeout