Search

Node Shutdown Problem

참고
cat << EOF > self-managed-ng.yaml apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: wsi-cluster region: ap-northeast-2 vpc: id: "vpc-0364a39b2eb9c1fc4" # 클러스터가 사용하는 VPC ID subnets: public: ap-northeast-2a: id: "subnet-049f09f36ea0e7bad" # public subnet id ap-northeast-2b: id: "subnet-095626d8931b62f43" # public subnet id securityGroup: "sg-064872fa4b32fcd57" nodeGroups: - name: wsi-self-managed-ng desiredCapacity: 2 minSize: 2 maxSize: 2 instancesDistribution: instanceTypes: ["c5.xlarge"] onDemandPercentageAboveBaseCapacity: 0 # spot인스턴스로만 이루어진 노드그룹 생성 labels: nodegroup: wsi-self-managed-ng EOF
Shell
복사
eksctl create nodegroup -f self-managed-ng.yaml
Shell
복사
kubectl apply -f https://github.com/aws/aws-node-termination-handler/releases/download/v1.25.1/all-resources.yaml
Shell
복사
aws ecr-public get-login-password \ --region us-east-1 | helm registry login \ --username AWS \ --password-stdin public.ecr.aws
Shell
복사
만약 기존에 aws-node-termination handler가 존재한다면 지우고 재설치 필요
helm upgrade --install aws-node-termination-handler \ --namespace kube-system \ --set enableSpotInterruptionDraining="true" \ --set enableRebalanceMonitoring="true" \ --set enableScheduledEventDraining="false" \ oci://public.ecr.aws/aws-ec2/helm/aws-node-termination-handler --version $CHART_VERSION
Shell
복사
kubectl apply -f busy-app.yaml
Shell
복사