0

我正在学习 Kubernetes,并尝试使用以下配置简单文件创建 AWS EKS Fargate 集群

kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5

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

fargateProfiles:
  - name: fp-default
    selectors:
      # All workloads in the "default" Kubernetes namespace will be
      # scheduled onto Fargate:
      - namespace: default
      # All workloads in the "kube-system" Kubernetes namespace will be
      # scheduled onto Fargate:
      - namespace: kube-system
  - name: fp-sandbox
    selectors:
      # All workloads in the "sandbox" Kubernetes namespace matching the
      # following label selectors will be scheduled onto Fargate:
      - namespace: sandbox
        labels:
          env: sandbox
          checks: passed
  - name: fp-fluxcd
    selectors:
      # All workloads in the "fluxcd" Kubernetes namespace matching the
      # following label selectors will be scheduled onto Fargate:
      - namespace: fluxcd

我收到以下错误。如何在上面的配置文件中指定可用区?

[✖]  AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Cannot create cluster 'sandbox' because us-east-1a, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f (Service: AmazonEKS; Status Code: 400; Error Code: UnsupportedAvailabilityZoneException; Request ID: 7c5c4544-4fe5-4ed5-96a8-099d60e1e5ab; Proxy: null)"
4

1 回答 1

0

请参阅 eksctl配置文件架构

kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5

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

fargateProfiles:
  - name: fp-default
    selectors:
      # All workloads in the "default" Kubernetes namespace will be
      # scheduled onto Fargate:
      - namespace: default
      # All workloads in the "kube-system" Kubernetes namespace will be
      # scheduled onto Fargate:
      - namespace: kube-system
  - name: fp-sandbox
    selectors:
      # All workloads in the "sandbox" Kubernetes namespace matching the
      # following label selectors will be scheduled onto Fargate:
      - namespace: sandbox
        labels:
          env: sandbox
          checks: passed
  - name: fp-fluxcd
    selectors:
      # All workloads in the "fluxcd" Kubernetes namespace matching the
      # following label selectors will be scheduled onto Fargate:
      - namespace: fluxcd

availabilityZones: ['us-east-1b']
于 2021-02-09T15:53:00.790 回答