title: EKS: Use cluster config yaml file with eksctl to create a new cluster but node can't join cluster
body: <p>I am new to eks. I use this cluster config yaml file to create a new cluster,</p>
  <pre><code>apiVersion: eksctl.io/v1alpha5
  kind: ClusterConfig
   
  metadata:
    name: h2-dev-cluster
    region: us-west-2
   
  nodeGroups:
    - name: h2-dev-ng-1
      instanceType: t2.small
      desiredCapacity: 2
      ssh: # use existing EC2 key
        publicKeyName: dev-eks-node
  </code></pre>
  <p>but eksctl stuck at</p>
  <p><code>waiting for at least 1 node(s) to become ready in &quot;h2-dev-ng-1</code></p>
  <p>then timeout.</p>
  <p>I have checked all points from this aws document <a href="https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html</a></p>
  <p>all the points are right exclude  <code>The ClusterName in your worker node AWS CloudFormation template</code>  I can't check because <code>UserData</code> has been encrypted by cloudformation.</p>
  <p>I access to one of node and type <code>journalctl -u kubelet</code>, then find these error</p>
  <pre><code>Jul 03 08:22:31 ip-192-168-53-151.us-west-2.compute.internal kubelet[4541]: E0703 08:22:31.007677 4541 reflector.go:123] k8s.io/client-go/informers/factory.go:134: Failed to list *v1beta
  Jul 03 08:22:31 ip-192-168-53-151.us-west-2.compute.internal kubelet[4541]: E0703 08:22:31.391913 4541 kubelet.go:2272] node &quot;ip-192-168-53-151.us-west-2.compute.internal&quot; not found
  Jul 03 08:22:31 ip-192-168-53-151.us-west-2.compute.internal kubelet[4541]: E0703 08:22:31.434158 4541 reflector.go:123] k8s.io/kubernetes/pkg/kubelet/kubelet.go:459: Failed to list *v1.
  Jul 03 08:22:31 ip-192-168-53-151.us-west-2.compute.internal kubelet[4541]: E0703 08:22:31.492746 4541 kubelet.go:2272] node &quot;ip-192-168-53-151.us-west-2.compute.internal&quot; not found
  </code></pre>
  <p>Then I type  <code>cat /var/lib/kubelet/kubeconfig</code> , I see follows</p>
  <pre><code>apiVersion: v1
  kind: Config
  clusters:
  - cluster:
  certificate-authority: /etc/kubernetes/pki/ca.crt
  server: MASTER_ENDPOINT
  name: kubernetes
  contexts:
  - context:
  cluster: kubernetes
  user: kubelet
  name: kubelet
  current-context: kubelet
  users:
  - name: kubelet
  user:
  exec:
  apiVersion: client.authentication.k8s.io/v1alpha1
  command: /usr/bin/aws-iam-authenticator
  args:
  - &quot;token&quot;
  - &quot;-i&quot;
  - &quot;CLUSTER_NAME&quot;
  - --region
  - &quot;AWS_REGION&quot;
  </code></pre>
  <p>I noticed that parameter of server is <code>MASTER_ENDPINT</code>. So I run <code>/etc/eks/bootstrap.sh h2-dev-cluster</code>  to set cluster name. Find the parameter become right as folllows (I marked url)</p>
  <pre><code>apiVersion: v1
  kind: Config
  clusters:
  - cluster:
  certificate-authority: /etc/kubernetes/pki/ca.crt
  server: https://XXXXXXXX.gr7.us-west-2.eks.amazonaws.com
  name: kubernetes
  </code></pre>
  <p>run <code>sudo service restart kubectl</code> but  <code>journalctl -u kubelet</code>  still can find the same error, and nodes still can't join cluster</p>
  <p>How can I resolve it?</p>
  <pre><code>eksctl: 0.23.0 rc1 (also test with 0.20.0 has the same error)
  kubectl: 1.18.5
  os: ubuntu 18.04 (use a new ec2 )
  </code></pre>