Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to the server: dial tcp i/o time out

Tags:

kubernetes

When i run the kubectl version command , I get the following error message.

kubectl version Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"} Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout 

How do I resolve this?

like image 223
IT_novice Avatar asked Mar 13 '18 15:03

IT_novice


People also ask

What is TCP I O timeout?

The error dial tcp: i/o timeout occurs when a timeout happens between the Agent and the Blackire.io servers. If you encounter this issue, you may increase the timeout of the Agent by appending the following line to the Agent configuration: timeout=30s.

How do I remove Kubernetes context?

<name> To remove a context, you can run kubectl --kubeconfig=config-demo config unset contexts.

How do I change the context in Kubectl?

What this says is that you can create or modify contexts in your kubeconfig file with the command kubectl config set-context. This command also accepts the name of the context to be changed (or --current if you want to change the current context), as well as --user, --cluster, and --namespace options.


1 Answers

You can get relevant information about the client-server status by using the following command.

kubectl config view  

Now you can update or set k8s context accordingly with the following command.

kubectl config use-context CONTEXT-CHOSEN-FROM-PREVIOUS-COMMAND-OUTPUT 

you can do further action on kubeconfig file. the following command will provide you with all necessary information.

kubectl config --help 
like image 99
Suresh Vishnoi Avatar answered Oct 05 '22 22:10

Suresh Vishnoi