-->

DEVOPSZONES

  • Recent blogs

    AWS Kops kubectl: Unable to connect to the server: EOF

    AWS Kops kubectl: Unable to connect to the server: EOF


    AWS Kops kubectl: Unable to connect to the server: EOF

    This error is annoying. You could not be able to access you Kubernetes cluster. You would be hit with following error while accessing any kubernetes resources:

    $ kubectl cluster-info

    To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
    Unable to connect to the server: EOF

    $ kops validate cluster
    Using cluster from kubectl context: clusters.k8s.local

    Validating cluster clusters.k8s.local


    unexpected error during validation: error listing nodes: Get https://api-clusters-k8s-local-xxxxxxxxxxxxxxxxxxxxxxxxxxxx.elb.amazonaws.com/api/v1/nodes: EOF

    Thankfully we have solutions out there. I'm listing them here for you:

    Solution 1:



    • The Enpoint is https://api-clusters-k8s-local-xxxxxxxxxxxxxxxxxxxxxxxxxxxx.elb.amazonaws.com. 
    • That's an ELB, You check the status of the elb on your AWS console.
    • Also check that all the nodes are up and running on the EC2 console.


    Solution 2:



    • Find the bucket where the state is stored
    • Set export KOPS_STATE_STORE=s3://your-k8s-state-store or you can give that as an argument
    • Run kops update cluster --state=s3://your-k8s-state-store --yes


    No comments