delete eks
eksctl delete cluster --name cluster01 --wait
cluster ๋ฆฌ์คํธ๋ณด๊ธฐ
๊ธฐํ ์ฌ์ฉ๋ฒ
eksctl get nodegroup --cluster=cluster01
# ๋
ธ๋ ํ์ฅ
eksctl scale nodegroup --cluster=cluster01 --nodes=2 --name=cluster01-nodes
eksctl scale nodegroup --cluster=cluster01 --nodes=3 --nodes-max=3 --name=cluster01-nodes
eksctl scale nodegroup --cluster=<clusterName> --nodes=<desiredCount> --name=<nodegroupName> [ --nodes-min=<minSize> ] [ --nodes-max=<maxSize> ]
manage cluster
eksctl scale nodegroup --cluster=<clusterName> --nodes=<desiredCount> --name=<nodegroupName> [ --nodes-min=<minSize> ] [ --nodes-max=<maxSize> ]
kubectl ์ฌ์ฉ
kubectl get pod --all-namespaces
kubectl get pod --all-namespaces -o wide
์ ์ฒด pod ๊ฐฏ์ :
kubectl get pod --all-namespaces | wc -l
๋
ธ๋๋น ๊ฐฏ์ (๋
ธ๋ ์ด๋ฆ์ ํ์ธํ ๋
ธ๋๋ณ๋ก ์ฒดํฌ)
kubectl get node
kubectl get pod --all-namespaces -o wide | grep ip-192-168-10-183 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-28-3 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-4-220 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-65-172 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-69-253 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-78-242 | wc -l
kubectl get pod --all-namespaces -o wide | grep ip-192-168-9-123 | wc -l
max pod ๊ฐฏ์
๊ณต์์ ๋ค์๊ณผ ๊ฐ๋ค.
ENI * (# of IPv4 per ENI - 1) + 2
https://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/using-eni.html
์ฌ๊ธฐ์์ eni(์ต๋ ๋คํธ์ํฌ ์ธํฐํ์ด์ค ์) ํ๊ณ ์ธํฐํ์ด์ค๋น ํ๋ผ์ด๋ฐ ์ฃผ์ ์์ ์๋ค.
t3.small ๋ฅผ ์ฌ์ฉํ๋ฉด
๋
ธ๋๋น 11๊ฐ์ pod๋ฅผ ์ฌ์ฉํ ์ ์๋ค.
๋๊ตฐ๊ฐ๊ฐ ์ ๋ฆฌ๋ฅผ ํด์ ์ ์ด๋๊ฒ ์๋ค.
https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt
์๋ ํ์์ ๊ฐ๊ฒฉ์ ๊ตฌํ ์ ์๋ค.
https://aws.amazon.com/ec2/pricing/on-demand
pod ๊ฐฏ์๋ฅผ ์ ํ์ธํด์ ์ด๋ ํ์
์ด ํธํ๊ฑด์ง ๊ณ ๋ ค์ผํ ๋ฏํ๋ค.
node not ready status
node๊ฐ ๊ฐ์๊ธฐ not ready ์ํ์ด๋ค.
k9s๋ก ๋
ธ๋ ์ ํํ cordon ==> drain ==> delete๋ฅผ ์์๋๋ก ํด์ฃผ์๋ค. ๊ทธ๋ฌ๋ ์๋ก์ด ๋
ธ๋๋ฅผ ๋ง๋ค์ด ์ค๋ค.
๋
ธ๋๊ทธ๋ฃน ๋ณ๊ฒฝ
๋
ธ๋ ๊ทธ๋ฃน ์ถ๊ฐ
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster01
region: us-west-1
managedNodeGroups:
- name: nodegroup-2
instanceType: t3.medium
desiredCapacity: 4
volumeSize: 80
minSize: 3
maxSize: 10
ssh:
allow: true
eksctl create nodegroup --config-file nodegroup.yaml
eksctl get nodegroup --cluster=cluster01
๊ธฐ์กด ๋
ธ๋๊ทธ๋ฃน ์ญ์
eksctl delete nodegroup cluster01-nodes --cluster=cluster01