Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while running kubectl commands

Tags:

kubernetes

I have recently installed minikube and kubectl. However when I run kubectl get pods or any other command related to kubectl I get the error

Unable to connect to the server: unexpected EOF

Does anyone know how to fix this?I am using Ubuntu server 16.04.Thanks in advance.

like image 485
rmb Avatar asked Dec 09 '25 05:12

rmb


1 Answers

The following steps can be used for further debugging.

  1. Check the minikube local cluster status using minikube status command.

     $: minikube status
     minikube: Running
     cluster: Running
     kubectl: Correctly Configured: pointing to minikube-vm at 172.0.x.y
    
  2. If problem with kubectl configuratuion,then configure it using, kubectl config use-context minikube command.

    $: kubectl config use-context minikube
    Switched to context "minikube".
    
  3. Check the cluster status, using kubectl cluster-info command.

    $: kubectl cluster-info
    Kubernetes master is running at ...
    Heapster is running at ...
    KubeDNS is running at ...
    ...
    To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
    

Note: It can even be due to very simple reason: internet speed (it happend to me just now).

like image 98
codenio Avatar answered Dec 11 '25 03:12

codenio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!