【问题标题】:coredns not deploying in new EKS cluster?coredns 没有部署在新的 EKS 集群中?
【发布时间】:2021-05-19 13:00:53
【问题描述】:

我正在 Fargate 中部署 AWS EKS 集群(无 EC2 节点),使用现有 VPC 和公有子网和私有子网,并且能够使用 eksctl 成功创建集群。但是,我看到 coredns 部署在 EKS 控制台中停留在 0/2 Pods ready。我正在阅读我需要在我的安全组规则中启用端口 53,并且我已经启用了。这是我的配置文件。

$ 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"]

为什么 coredns 部署没有出现?

我确实在 kube-scheduler CloudWatch 日志中看到了这一点。

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

我认为因此我无法通过kubectl 与我的集群通信?

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

【问题讨论】:

    标签: kubernetes amazon-eks


    【解决方案1】:

    当我使用配置文件部署 EKS 集群时,使用我们现有的 VPC 和私有端点,coredns 部署设置为在 EC2 节点上启动。当然,Fargate 没有 EC2 节点。我必须编辑 coredns 部署以使用 fargate 并重新启动部署。

    【讨论】:

      猜你喜欢
      • 2021-09-02
      • 1970-01-01
      • 2021-03-16
      • 2020-10-08
      • 2021-12-14
      • 2018-12-25
      • 2021-04-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多