0
votes

I'm deploying an AWS EKS cluster in Fargate (no EC2 nodes) using an existing VPC with both public and private subnets, and am able to create the cluster successfully with eksctl. However, I see that the coredns Deployment is stuck at 0/2 Pods ready in the EKS console. I was reading that I need to enable port 53 in my security group rules, and I have. Here's my config file.

$ eksctl create cluster -f eks-sandbox-cluster.yaml
eks-sandbox-cluster.yaml
------------------------
kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5

metadata:
  name: sandbox
  region: us-east-1
  version: "1.18"

# The VPC and subnets are for the data plane, where the pods will
# ultimately be deployed.
vpc:
  id: "vpc-12345678"
  clusterEndpoints:
    privateAccess: true
    publicAccess: false
  subnets:
  # us-east-1a is full
    private:
      us-east-1b:
        id: "subnet-xxxxxxxx"
      us-east-1c:
        id: "subnet-yyyyyyy"
    public:
      us-east-1b:
        id: "subnet-aaaaaaaa"
      us-east-1c:
        id: "subnet-bbbbbbbb"

fargateProfiles:
  - name: fp-default
    selectors:
      - namespace: default
  - name: fp-kube
      - namespace: kube-system
  - name: fp-myapps
    selectors:
      - namespace: myapp
        labels:
          app: myapp

cloudWatch:
  clusterLogging:
    enableTypes: ["api", "audit", "authenticator", "controllerManager", "scheduler"]

Why is coredns Deployment not coming up?

I do see this in the kube-scheduler CloudWatch logs.

I0216 16:46:43.841076       1 factory.go:459] Unable to schedule kube-system/coredns-c79dcb98c-9pfrz: no nodes are registered to the cluster; waiting

I think because of this I can't talk to my cluster either via kubectl?

$ kubectl get pods
Unable to connect to the server: dial tcp 10.23.x.x:443: i/o timeout
1

1 Answers

0
votes

When I deployed the EKS cluster using a config file, using our existing VPC with private only endpoits, the coredns Deployment was set to start on EC2 nodes. Of course with Fargate there are no EC2 nodes. I had to edit the coredns Deployment to use fargate and restart the Deployment.