首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用eckctl指定AWS EKS Fargate集群的可用区?

如何使用eckctl指定AWS EKS Fargate集群的可用区?
EN

Stack Overflow用户
提问于 2021-02-09 03:48:03
回答 1查看 321关注 0票数 0

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

代码语言:javascript
复制
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

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

代码语言:javascript
复制
[✖]  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)"
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-09 23:53:01

请参阅eksctl config file schema

代码语言:javascript
复制
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']
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66108320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档