eksctl로 노드그룹 추가 방법

  • 테디베라스
    (테디베라스)
  • 테디베라스's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
15 Apr 2022 11:47 #10378 작성자: 테디베라스
테디베라스 님의 글: eksctl로 노드그룹 추가 방법
cat << EOF > add-mngs-spot.yaml
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

managedNodeGroups:
- name: mng-spot-4vcpu-16gb
  amiFamily: AmazonLinux2
  desiredCapacity: 2
  minSize: 0
  maxSize: 4
  spot: true
  instanceTypes:
  - m4.xlarge
  - m5.xlarge
  - m5a.xlarge
  - m5ad.xlarge
  - m5d.xlarge
  - t2.xlarge
  - t3.xlarge
  - t3a.xlarge
  iam:
    withAddonPolicies:
      autoScaler: true
      cloudWatch: true
      albIngress: true
  privateNetworking: true
  taints:
    - key: spotInstance
      value: "true"
      effect: PreferNoSchedule
  labels:
    alpha.eksctl.io/cluster-name: eksworkshop-eksctl
    alpha.eksctl.io/nodegroup-name: mng-spot-4vcpu-16gb
    intent: apps
  tags:
    alpha.eksctl.io/nodegroup-name: mng-spot-4vcpu-16gb
    alpha.eksctl.io/nodegroup-type: managed
    k8s.io/cluster-autoscaler/node-template/label/intent: apps
    k8s.io/cluster-autoscaler/node-template/taint/spotInstance: "true:PreferNoSchedule"

- name: mng-spot-8vcpu-32gb
  amiFamily: AmazonLinux2
  desiredCapacity: 1
  minSize: 0
  maxSize: 2
  spot: true
  instanceTypes:
  - m4.2xlarge
  - m5.2xlarge
  - m5a.2xlarge
  - m5ad.2xlarge
  - m5d.2xlarge
  - t2.2xlarge
  - t3.2xlarge
  - t3a.2xlarge
  iam:
    withAddonPolicies:
      autoScaler: true
      cloudWatch: true
      albIngress: true
  privateNetworking: true
  taints:
    - key: spotInstance
      value: "true"
      effect: PreferNoSchedule
  labels:
    alpha.eksctl.io/cluster-name: eksworkshop-eksctl
    alpha.eksctl.io/nodegroup-name: mng-spot-8vcpu-32gb
    intent: apps
  tags:
    alpha.eksctl.io/nodegroup-name: mng-spot-8vcpu-32gb
    alpha.eksctl.io/nodegroup-type: managed
    k8s.io/cluster-autoscaler/node-template/label/intent: apps
    k8s.io/cluster-autoscaler/node-template/taint/spotInstance: "true:PreferNoSchedule"

metadata:
  name: eksworkshop-eksctl
  region: ${AWS_REGION}
  version: "1.21"

EOF
eksctl create nodegroup --config-file=add-mngs-spot.yaml
Time to create page: 0.048 seconds
Powered by Kunena Forum