2024å¹´12æ1æ¥ã Amazon Elastic Kubernetes Service (Amazon EKS) ã® Auto Mode ãçºè¡¨ããã¾ããã
ããã¯ãKubernetes ã¯ã©ã¹ã¿ã¼ã®ã³ã³ãã¥ã¼ãã£ã³ã°ãã¹ãã¬ã¼ã¸ãããã³ãããã¯ã¼ãã³ã°ã®ç®¡çãå®å ¨ã«èªååããæ°æ©è½ã§ãããã¤ãã®ç¹å¾´ãããã¾ãã
ä»åã¯ããã®ä¸ã§ã
* å¹çæ§ * ã¢ããªã±ã¼ã·ã§ã³å¯ç¨æ§ * ã¢ããã°ã¬ã¼ã
ã«ã¤ãã¦ãå®éã«åä½ã確èªãã¦ã¿ã¾ããã
EKS Auto Mode ã®ç¹å¾´
Kubernetes ã¯ã©ã¹ã¿ã¼ç®¡çã®åçå:
- EKS èªåã¢ã¼ãã¯ãéç¨ãªã¼ãã¼ããããæå°éã«æããªããæ¬çªç°å¢å¯¾å¿ã®ã¯ã©ã¹ã¿ã¼ãæä¾ãããã¨ã§ãEKS 管çãåçåãã¾ãã
- EKS èªåã¢ã¼ãã使ç¨ããã¨ãEKS ã«é¢ããæ·±ãå°éç¥èãå¿ è¦ã¨ããã«ãè¦æ±ã®å³ããåçãªã¯ã¼ã¯ãã¼ããèªä¿¡ãæã£ã¦å®è¡ã§ãã¾ãã
å¹çæ§:
- EKS èªåã¢ã¼ãã¯ãNodePool ã¨ã¯ã¼ã¯ãã¼ãè¦ä»¶ã«ãã£ã¦å®ç¾©ãããæè»æ§ãéµå®ããªããã³ã¹ããè¨ç®ããããã«è¨è¨ããã¦ãã¾ãã
- ã¾ããæªä½¿ç¨ã®ã¤ã³ã¹ã¿ã³ã¹ãçµäºããã¯ã¼ã¯ãã¼ããä»ã®ã¯ã¼ã«ã¼ãã¼ãã«çµ±åãã¦ãã³ã¹ãå¹çãåä¸ããã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ã®å¯ç¨æ§:
- EKS èªåã¢ã¼ãã§ã¯ãKubernetes ã¢ããªã±ã¼ã·ã§ã³ã®éè¦ã«åºã¥ã㦠EKS ã¯ã©ã¹ã¿ã¼å ã®ã¯ã¼ã«ã¼ãã¼ããåçã«è¿½å ã¾ãã¯åé¤ããã¾ãã
- ããã«ãããæåã§ã®å®¹éè¨ç»ã®å¿ è¦æ§ãæå°éã«æããããã¢ããªã±ã¼ã·ã§ã³ã®å¯ç¨æ§ã確ä¿ããã¾ãã
ã»ãã¥ãªãã£:
- EKS èªåã¢ã¼ãã§ã¯ãã¯ã¼ã«ã¼ãã¼ãã«å¯¾ãã¦ä¸å¤ã¨ãã¦æ±ããã AMI ã使ç¨ãã¾ãã
- ãããã® AMI ã¯ãããã¯ãã¦ã³ãããã½ããã¦ã§ã¢ãå¼·å¶ããSELinux ã®å¼·å¶ã¢ã¯ã»ã¹å¶å¾¡ãæå¹ã«ããèªã¿åãå°ç¨ã®ã«ã¼ããã¡ã¤ã«ã·ã¹ãã ãæä¾ãã¾ãã
- ããã«ãEKS èªåã¢ã¼ãã§èµ·åãããã¯ã¼ã«ã¼ãã¼ãã®æ大æå¹æé㯠21 æ¥é (ç縮å¯è½) ã§ããã®å¾ã¯èªåçã«æ°ããã¯ã¼ã«ã¼ãã¼ãã«ç½®ãæãããã¾ãã
- ãã®ã¢ããã¼ãã¯ãå¤ãã®ã客æ§ããã§ã«æ¡ç¨ãã¦ãããã¹ããã©ã¯ãã£ã¹ã«æ²¿ã£ã¦ãå®æçã«ã¯ã¼ã«ã¼ãã¼ãã循ç°ããããã¨ã§ã»ãã¥ãªãã£ä½å¶ãå¼·åãã¾ãã
èªåã¢ããã°ã¬ã¼ã:
- EKS èªåã¢ã¼ãã§ã¯ãæ§æããããããä¸æäºç® (PDB) ã¨ã¯ã¼ã«ã¼ãã¼ããã¼ã«ä¸æäºç® (NDB) ãå°éããªãããKubernetes ã¯ã©ã¹ã¿ã¼ãã¯ã¼ã«ã¼ãã¼ããããã³é¢é£ã³ã³ãã¼ãã³ããææ°ã®ãããã§ææ°ã®ç¶æ ã«ä¿ã¡ã¾ãã
- æ大 21 æ¥éã®æå¹æéã§ã¯ãPDB ããããã¯ãããããã®ä»ã®æ§æã«ãã£ã¦æ´æ°ã妨ãããããããå ´åã¯ãä»å ¥ãå¿ è¦ã«ãªããã¨ãããã¾ãã
管ç対象ã³ã³ãã¼ãã³ã:
- EKS èªåã¢ã¼ãã«ã¯ãKubernetes 㨠AWS ã¯ã©ã¦ãæ©è½ãã³ã¢ã³ã³ãã¼ãã³ãã¨ãã¦å«ã¾ãã¦ãããé常ã¯ã¢ããªã³ã¨ãã¦ç®¡çããå¿ è¦ãããã¾ãã
- ããã«ã¯ãããã IP ã¢ãã¬ã¹ã®å²ãå½ã¦ãããã ãããã¯ã¼ã¯ ããªã·ã¼ããã¼ã«ã« DNS ãµã¼ãã¹ãGPU ãã©ã°ã¤ã³ããã«ã¹ ãã§ãã«ã¼ãEBS CSI ã¹ãã¬ã¼ã¸ã®çµã¿è¾¼ã¿ãµãã¼ããå«ã¾ãã¾ãã
ã«ã¹ã¿ãã¤ãºå¯è½ãª NodePool 㨠NodeClass :
- ã¯ã¼ã¯ãã¼ãã§ã¹ãã¬ã¼ã¸ãã³ã³ãã¥ã¼ãã£ã³ã°ãã¾ãã¯ãããã¯ã¼ã¯æ§æã®å¤æ´ãå¿ è¦ãªå ´åã¯ãEKS èªåã¢ã¼ãã使ç¨ãã¦ã«ã¹ã¿ã NodePool 㨠NodeClass ãä½æã§ãã¾ãã
- ããã©ã«ãã® NodePool 㨠NodeClass ã¯ç·¨éã§ãã¾ããããç¹å®ã®è¦ä»¶ãæºããããã«ãããã©ã«ãã®æ§æã¨ã¨ãã«æ°ããã«ã¹ã¿ã NodePool ã¾ã㯠NodeClass ã追å ã§ãã¾ãã
åä½ç¢ºèªã®çµæ
å¹çæ§ã«ã¤ãã¦
- ã¯ã©ã¹ã¿ä½æç´å¾ãæåã®ã¢ããªï¼Pod)èµ·åæã«ã¯ããã¦ã¯ã¼ã«ãã¼ãã確ä¿ããã¾ãã
- ãã®å¾ãPodãåé¤ããæªä½¿ç¨ã®ã¤ã³ã¹ã¿ã³ã¹ãçµäºããããã¨ã確èªã§ãã¾ããã
ã¢ããªã±ã¼ã·ã§ã³å¯ç¨æ§ã«ã¤ãã¦
- ãããæ°´å¹³ã¹ã±ã¼ã«åã¢ããªã®è² è·å¢ã«ä¼´ããå¿ è¦ã«å¿ãã¦ã¯ã¼ã«ãã¼ãã追å ããããã¨ã確èªãã¾ããã
- ä¸è¨ã®ãå¹çæ§ãã¨åããã¦ãã¢ããªã±ã¼ã·ã§ã³éè¦ã«å¿ãã¦ãå¿ è¦ãªãªã½ã¼ã¹ã確ä¿ããããã¨ã確èªã§ãã¾ããã
ã¢ããã°ã¬ã¼ãã«ã¤ãã¦
- ã³ã³ã½ã¼ã«ç»é¢ããã¢ãããã¼ããã¯ãªãã¯ãããã¨ã§ããã¹ã¿ã¼ãã¼ãããã¯ã¼ã«ãã¼ãã¾ã§èªåã§ã¢ããã°ã¬ã¼ãããããã¨ã確èªã§ãã¾ããã
- ãã®æãPDBã§æå®ããã¢ããªã®å¯ç¨æ§ãç¶æããç¶æ ã§ãæ°ãã«ã¢ããã°ã¬ã¼ãå¾ã®ã¯ã¼ã«ãã¼ãã§Podãåèµ·åãããåèµ·åãå®äºããå¾ãã¢ããã°ã¬ã¼ãåã®ã¯ã¼ã«ãã¼ããåé¤ããããã¨ã確èªã§ãã¾ããã
[追å ]Kubernetes ã¯ã©ã¹ã¿ã¼ç®¡çã®åçå
- 以ä¸ãããã¯ã©ã¹ã¿ç®¡çã®åçåã¨ããç¹ã§é²åã伺ãããçµæã¨ãªãã¾ããã
ï¼åæ²ï¼
- EKS èªåã¢ã¼ãã¯ãéç¨ãªã¼ãã¼ããããæå°éã«æããªããæ¬çªç°å¢å¯¾å¿ã®ã¯ã©ã¹ã¿ã¼ãæä¾ãããã¨ã§ãEKS 管çãåçåãã¾ãã
- EKS èªåã¢ã¼ãã使ç¨ããã¨ãEKS ã«é¢ããæ·±ãå°éç¥èãå¿ è¦ã¨ããã«ãè¦æ±ã®å³ããåçãªã¯ã¼ã¯ãã¼ããèªä¿¡ãæã£ã¦å®è¡ã§ãã¾ãã
åä½ç¢ºèªã®å 容
ã¯ã©ã¹ã¿ã¼ã®ä½æ
ä½æã«ã¯ããã¸ã¡ã³ãã³ã³ã½ã¼ã«ãå©ç¨ãã¾ããã詳細æé ã¯å²æãã¾ãã詳細ãç¥ãããæ¹ã¯å ¬å¼ããã¥ã¡ã³ããåç §é¡ãã¾ãã
ä½æããã¯ã©ã¹ã¿ã®ç°å¢ãæ§æãã¾ã
[cloudshell-user@ip-10-134-24-146 ~]$ aws eks update-kubeconfig --name "${CLUSTER_NAME}" Added new context arn:aws:eks:ap-northeast-1:account-id:cluster/interesting-funk-otter to /home/cloudshell-user/.kube/config
å¹çæ§ã®ç¢ºèª
- ã¯ã©ã¹ã¿ã¼ä½æç´å¾ã®ãªã½ã¼ã¹ç¶æ ã確èªãã¦ã¿ã¾ãã
- å¾æ¥ï¼é常ï¼åç §ã§ãã kube-system ãã¼ã ã¹ãã¼ã¹å ã®ãªã½ã¼ã¹ãã¯ã¼ã«ã¼ãã¼ãã¯ç¢ºèªã§ãã¾ããã
[cloudshell-user@ip-10-134-24-146 ~]$ kubectl get po -A No resources found [cloudshell-user@ip-10-134-24-146 ~]$ kubectl get po -n kube-system No resources found in kube-system namespace.
[cloudshell-user@ip-10-134-24-146 ~]$ kubectl get node No resources found
- ãã®ç¶æ ã§ãNGINXã®Podãä½æãã¦ã¿ã¾ãã
[cloudshell-user@ip-10-132-90-84 ~]$ kubectl run nginx --image=nginx pod/nginx created [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 10s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 14s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 17s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 20s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 5s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 ContainerCreating 0 34s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 ContainerCreating 0 38s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 0/1 ContainerCreating 0 45s [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po NAME READY STATUS RESTARTS AGE nginx 1/1 Running 0 52s
Podèµ·åç´å¾ãPodã¯Pending ç¶æ ã§ããã®å¾ã¯ã¼ã«ã¼ãã¼ãã確ä¿ããã段éã§ãContaineCreateting ã¨ãªãã52ç§å¾ã«ã¯ Running ã¨ãªãã¾ãã
Podãèµ·åããã¦ãã¯ãã㦠i-11111111111111111 ã¯ã¼ã«ã¼ãã¼ããä½æããã¾ãããéè¦ã«å¿ãã¦ãªã½ã¼ã¹ã確ä¿ããã¦ãã¾ãã
Podãåé¤ããã¨ããã°ãããã¦ã¯ã¼ã«ã¼ãã¼ããåé¤ããã¾ãã
[cloudshell-user@ip-10-132-90-84 ~]$ kubectl delete po nginx pod "nginx" deleted [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get po No resources found in default namespace. [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m4s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m8s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m11s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m18s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m30s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m46s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 Ready <none> 8m59s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 NotReady <none> 9m10s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-11111111111111111 NotReady <none> 9m21s v1.31.1-eks-1b3e656 [cloudshell-user@ip-10-132-90-84 ~]$ kubectl get node No resources found
- ãæªä½¿ç¨ã®ã¤ã³ã¹ã¿ã³ã¹ãçµäºããããã¨ã確èªã§ãã¾ããã
- ãªãã»ã©ãéè¦ã«åããã¦ãªã½ã¼ã¹ã確ä¿ãããã¨ã§ã³ã¹ãå¹çãåä¸ããã¦ããã¨ã¯ããã®ãã¨ã§ããããã
ã¢ããªã±ã¼ã·ã§ã³å¯ç¨æ§ã®ç¢ºèª
ç¶ãã¦ãAuto Scale ã®åä½ãè¦ã¦ããã¾ãã
ãã¹ãç¨ã« php-apache ãããã¤ã¡ã³ãã¨åãååã®ãµã¼ãã¹ãä½æãã¾ãã
cat <<EOF | kubectl apply -f - apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache replicas: 1 template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: k8s.gcr.io/hpa-example ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m --- apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports: - port: 80 selector: run: php-apache EOF
- php-apache ãããã¤ã¡ã³ãã«å¯¾ã㦠Horizontal Pod Auto Scaler (HPA) ãä½æãã¾ããï¼CPU使ç¨ç50%ãè¶ ããã¨èªåã§ã¹ã±ã¼ã«ï¼
[cloudshell-user@ip-10-134-24-146 sample]$ kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10 horizontalpodautoscaler.autoscaling/php-apache autoscaled
- è² è·çæç¨ã® load-generator ãããã¤ã¡ã³ã ãä½æãã¾ããä½æç´å¾ããè² è·ãã¹ããå®è¡ããã¾ããåæã®ã¬ããªã«æ°ã¯ï¼ï¼
cat <<EOF | kubectl apply -f - apiVersion: apps/v1 kind: Deployment metadata: name: load-generator spec: replicas: 5 selector: matchLabels: app: load-generator template: metadata: labels: app: load-generator spec: containers: - name: load-generator image: alpine command: ["/bin/sh", "-c"] args: - "apk add --no-cache curl && while true; do curl -s http://php-apache > /dev/null; done" EOF
- ããè² è·ãä¸ããããã« load-generator ã®ã¬ããªã«æ°ãï¼ï¼ã«æ¡å¤§ãã¦å®è¡ãã¾ãã
[cloudshell-user@ip-10-134-24-146 ~]$ kubectl scale deploy load-generator --replicas=50 deployment.apps/load-generator scaled
- ã¯ã¼ã«ã¼ãã¼ãã®ç¶æ ã確èªãã¾ãã
[cloudshell-user@ip-10-134-24-146 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-22222222222222222 Ready <none> 10m v1.30.5-eks-baa6d11 [cloudshell-user@ip-10-134-24-146 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-22222222222222222 Ready <none> 10m v1.30.5-eks-baa6d11 [cloudshell-user@ip-10-134-24-146 ~]$ kubectl get node NAME STATUS ROLES AGE VERSION i-33333333333333333 Ready <none> 30s v1.30.5-eks-baa6d11 i-22222222222222222 Ready <none> 11m v1.30.5-eks-baa6d11
- ãã¹ãéå§ç´å¾ã¯ãi-22222222222222222 ã¯ã¼ã«ã¼ãã¼ãï¼å°ã§ããããã¬ããªã«æ°ã®æ¡å¤§ã§è² è·ãå¢å ãï¼å°ç®ã®ã¯ã¼ã«ã¼ãã¼ã i-33333333333333333 ãä½æããã¾ããã
- ã¢ããªã±ã¼ã·ã§ã³ã®éè¦ã«åºã¥ã㦠EKS ã¯ã©ã¹ã¿ã¼å ã®ã¯ã¼ã«ã¼ãã¼ããåçã«è¿½å ããããã¨ã確èªã§ãã¾ããã
- ããããéè¦ã«åããã¦ãªã½ã¼ã¹ã確ä¿ãããã¨ã§ã³ã¹ãå¹çãåä¸ããã¦ãããã¤ã³ãã§ããã
ã¢ããã°ã¬ã¼ãã®åä½ç¢ºèª
æå¾ã«ã¢ããã°ã¬ã¼ãã®åä½ã確èªãã¾ãã
ã¢ããã°ã¬ã¼ãã¤ã³ãµã¤ãã確èªãã¾ãã
ï¼ä»¶åå¨ããããã§ãã
[cloudshell-user@ip-10-134-1-45 ~]$ aws eks list-insights --region ap-northeast-1 --cluster-name $CLUSTER { "insights": [ { "id": "e93f18ce-bb38-43c5-8128-1fb4d9eff704", "name": "Deprecated APIs removed in Kubernetes v1.32", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.32", "lastRefreshTime": "2024-12-11T07:54:58+00:00", "lastTransitionTime": "2024-12-11T07:54:57+00:00", "description": "Checks for usage of deprecated APIs that are scheduled for removal in Kubernetes v1.32. Upgrading your cluster before migrating to the updated APIs supported by v1.32 could cause application impact.", "insightStatus": { "status": "PASSING", "reason": "No deprecated API usage detected within the last 30 days." } } ] } [cloudshell-user@ip-10-134-1-45 ~]$ aws eks describe-insight --region ap-northeast-1 --id e93f18ce-bb38-43c5-8128-1fb4d9eff704 --cluster-name $CLUSTER { "insight": { "id": "e93f18ce-bb38-43c5-8128-1fb4d9eff704", "name": "Deprecated APIs removed in Kubernetes v1.32", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.32", "lastRefreshTime": "2024-12-11T07:54:58+00:00", "lastTransitionTime": "2024-12-11T07:54:57+00:00", "description": "Checks for usage of deprecated APIs that are scheduled for removal in Kubernetes v1.32. Upgrading your cluster before migrating to the updated APIs supported by v1.32 could cause application impact.", "insightStatus": { "status": "PASSING", "reason": "No deprecated API usage detected within the last 30 days." }, "recommendation": "Update manifests and API clients to use newer Kubernetes APIs if applicable before upgrading to Kubernetes v1.32.", "additionalInfo": { "EKS update cluster documentation": "https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html", "Kubernetes v1.32 deprecation guide": "https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-32" }, "resources": [], "categorySpecificSummary": { "deprecationDetails": [ { "usage": "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas", "replacedWith": "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas", "stopServingVersion": "1.32", "startServingReplacementVersion": "1.29", "clientStats": [] }, { "usage": "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations", "replacedWith": "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations", "stopServingVersion": "1.32", "startServingReplacementVersion": "1.29", "clientStats": [] } ] } } }
ã¹ãã¼ã¿ã¹ããåæ ¼ ( Passing ) ãã¨ãªã£ã¦ããã®ã§ããã®ã¾ã¾é²ãã¾ãã
IPã¢ãã¬ã¹ã®ç©ºãã確èªãã¾ãã
[cloudshell-user@ip-10-134-1-45 ~]$ aws ec2 describe-subnets --subnet-ids \ > $(aws eks describe-cluster --name ${CLUSTER} \ > --query 'cluster.resourcesVpcConfig.subnetIds' \ > --output text) \ > --query 'Subnets[*].[SubnetId,AvailabilityZone,AvailableIpAddressCount]' \ > --output table --------------------------------------------------------- | DescribeSubnets | +---------------------------+-------------------+-------+ | subnet-xxxxxxxxxxxxxxxxx | ap-northeast-1c | 4090 | | subnet-yyyyyyyyyyyyyyyyy | ap-northeast-1a | 4090 | +---------------------------+-------------------+-------+
- ååã«ç©ºãIPã¢ãã¬ã¹ã¯ãããããªã®ã§ IAM ROle 㨠Add-on ã確èªãã¾ãã
[cloudshell-user@ip-10-134-1-45 ~]$ aws iam get-role --role-name ${ROLE_ARN##*/} \ > --query 'Role.AssumeRolePolicyDocument' { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "eks.amazonaws.com" }, "Action": [ "sts:AssumeRole", "sts:TagSession" ] } ] } [cloudshell-user@ip-10-134-1-45 ~]$ aws eks list-addons --cluster-name $CLUSTER { "addons": [] }
ã¢ãããã¼ãã«ããã¢ããªã¸ã®å½±é¿ã確èªããããããã¹ãç¨ã® myapp ã§ãããã¤ã¡ã³ããä½æãã¾ãã
myapp ã«ã¯ PDBï¼PodDisruptionBudgetï¼ ãå®ç¾©ãæä½ã§ãã«80%ã®å¯ç¨æ§ã確ä¿ãã¾ãã
å¯ç¨æ§ã確èªããããã«ãmyapp ã¯ã¬ããªã«æ°ãï¼ï¼ã¨ãã¾ãã
apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: myapp spec: minAvailable: "80%" selector: matchLabels: app: myapp --- apiVersion: apps/v1 kind: Deployment metadata: name: myapp spec: replicas: 10 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - image: public.ecr.aws/eks-distro/kubernetes/pause:3.2 name: myapp resources: requests: cpu: "1" memory: 256M topologySpreadConstraints: - labelSelector: matchLabels: app: host-zone-spread maxSkew: 2 topologyKey: kubernetes.io/hostname whenUnsatisfiable: DoNotSchedule - labelSelector: matchLabels: app: host-zone-spread maxSkew: 2 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: DoNotSchedule
- ä¸è¨ããããã¤ããPod ãRuningç¶æ ã«ãªãã®ãå¾ ã¡ã¾ãã
[cloudshell-user@ip-10-132-66-135 sample]$ kubectl apply -f pdb.yaml poddisruptionbudget.policy/myapp created [cloudshell-user@ip-10-132-66-135 sample]$ kubectl apply -f myapp.yaml deployment.apps/myapp created [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get node No resources found [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get node No resources found [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get pod NAME READY STATUS RESTARTS AGE myapp-5865fb57f-7rsqm 0/1 Pending 0 22s myapp-5865fb57f-9d6k6 0/1 Pending 0 22s myapp-5865fb57f-9g2js 0/1 Pending 0 22s myapp-5865fb57f-bdsvj 0/1 Pending 0 22s myapp-5865fb57f-h9rj9 0/1 Pending 0 22s myapp-5865fb57f-hp9g5 0/1 Pending 0 22s myapp-5865fb57f-r8dzc 0/1 Pending 0 22s myapp-5865fb57f-rp7kx 0/1 Pending 0 22s myapp-5865fb57f-sjwrm 0/1 Pending 0 22s myapp-5865fb57f-x2sdq 0/1 Pending 0 22s [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get node No resources found [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get node NAME STATUS ROLES AGE VERSION i-44444444444444444 Ready <none> 8s v1.30.5-eks-baa6d11 [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get pod NAME READY STATUS RESTARTS AGE myapp-5865fb57f-7rsqm 0/1 ContainerCreating 0 38s myapp-5865fb57f-9d6k6 0/1 ContainerCreating 0 38s myapp-5865fb57f-9g2js 0/1 ContainerCreating 0 38s myapp-5865fb57f-bdsvj 0/1 ContainerCreating 0 38s myapp-5865fb57f-h9rj9 0/1 ContainerCreating 0 38s myapp-5865fb57f-hp9g5 0/1 ContainerCreating 0 38s myapp-5865fb57f-r8dzc 0/1 ContainerCreating 0 38s myapp-5865fb57f-rp7kx 0/1 ContainerCreating 0 38s myapp-5865fb57f-sjwrm 0/1 ContainerCreating 0 38s myapp-5865fb57f-x2sdq 0/1 ContainerCreating 0 38s [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get node NAME STATUS ROLES AGE VERSION i-44444444444444444 Ready <none> 19s v1.30.5-eks-baa6d11 [cloudshell-user@ip-10-132-66-135 sample]$ kubectl get pod NAME READY STATUS RESTARTS AGE myapp-5865fb57f-7rsqm 1/1 Running 0 50s myapp-5865fb57f-9d6k6 1/1 Running 0 50s myapp-5865fb57f-9g2js 1/1 Running 0 50s myapp-5865fb57f-bdsvj 1/1 Running 0 50s myapp-5865fb57f-h9rj9 1/1 Running 0 50s myapp-5865fb57f-hp9g5 0/1 ContainerCreating 0 50s myapp-5865fb57f-r8dzc 1/1 Running 0 50s myapp-5865fb57f-rp7kx 0/1 ContainerCreating 0 50s myapp-5865fb57f-sjwrm 1/1 Running 0 50s myapp-5865fb57f-x2sdq 1/1 Running 0 50s
- ã¯ã¼ã«ã¼ãã¼ãã®è©³ç´°ã確èªãã¾ãã
[cloudshell-user@ip-10-132-66-135 sample]$ kubectl describe node i-44444444444444444 Name: i-44444444444444444 Roles: <none> Labels: app.kubernetes.io/managed-by=eks beta.kubernetes.io/arch=amd64 beta.kubernetes.io/instance-type=c5a.4xlarge beta.kubernetes.io/os=linux eks.amazonaws.com/compute-type=auto eks.amazonaws.com/instance-category=c eks.amazonaws.com/instance-cpu=16 eks.amazonaws.com/instance-cpu-manufacturer=amd eks.amazonaws.com/instance-cpu-sustained-clock-speed-mhz=3300 eks.amazonaws.com/instance-ebs-bandwidth=3170 eks.amazonaws.com/instance-encryption-in-transit-supported=true eks.amazonaws.com/instance-family=c5a eks.amazonaws.com/instance-generation=5 eks.amazonaws.com/instance-hypervisor=nitro eks.amazonaws.com/instance-memory=32768 eks.amazonaws.com/instance-network-bandwidth=5000 eks.amazonaws.com/instance-size=4xlarge eks.amazonaws.com/nodeclass=default failure-domain.beta.kubernetes.io/region=ap-northeast-1 failure-domain.beta.kubernetes.io/zone=ap-northeast-1a k8s.io/cloud-provider-aws=8929092e801005c613d919fa59bb4a6a karpenter.sh/capacity-type=on-demand karpenter.sh/initialized=true karpenter.sh/nodepool=general-purpose karpenter.sh/registered=true kubernetes.io/arch=amd64 kubernetes.io/hostname=i-44444444444444444 kubernetes.io/os=linux node.kubernetes.io/instance-type=c5a.4xlarge topology.ebs.csi.eks.amazonaws.com/zone=ap-northeast-1a topology.k8s.aws/zone-id=apne1-az4 topology.kubernetes.io/region=ap-northeast-1 topology.kubernetes.io/zone=ap-northeast-1a Annotations: alpha.kubernetes.io/provided-node-ip: 10.0.142.77 csi.volume.kubernetes.io/nodeid: {"ebs.csi.eks.amazonaws.com":"i-44444444444444444 "} eks.amazonaws.com/nodeclass-hash: 3809868827326149578 eks.amazonaws.com/nodeclass-hash-version: v1 karpenter.sh/nodepool-hash: 4012513481623584108 karpenter.sh/nodepool-hash-version: v3 node.alpha.kubernetes.io/ttl: 0 volumes.kubernetes.io/controller-managed-attach-detach: true CreationTimestamp: Thu, 12 Dec 2024 06:51:22 +0000 Taints: <none> Unschedulable: false Lease: HolderIdentity: i-44444444444444444 AcquireTime: <unset> RenewTime: Thu, 12 Dec 2024 07:01:02 +0000 Conditions: Type Status LastHeartbeatTime LastTransitionTime Reason Message ---- ------ ----------------- ------------------ ------ ------- MemoryPressure False Thu, 12 Dec 2024 06:56:57 +0000 Thu, 12 Dec 2024 06:51:21 +0000 KubeletHasSufficientMemory kubelet has sufficient memory available DiskPressure False Thu, 12 Dec 2024 06:56:57 +0000 Thu, 12 Dec 2024 06:51:21 +0000 KubeletHasNoDiskPressure kubelet has no disk pressure PIDPressure False Thu, 12 Dec 2024 06:56:57 +0000 Thu, 12 Dec 2024 06:51:21 +0000 KubeletHasSufficientPID kubelet has sufficient PID available Ready True Thu, 12 Dec 2024 06:56:57 +0000 Thu, 12 Dec 2024 06:51:21 +0000 KubeletReady kubelet is posting ready status ContainerRuntimeReady True Thu, 12 Dec 2024 06:56:27 +0000 Thu, 12 Dec 2024 06:51:27 +0000 ContainerRuntimeIsReady Monitoring for the ContainerRuntime system is active StorageReady True Thu, 12 Dec 2024 06:56:27 +0000 Thu, 12 Dec 2024 06:51:27 +0000 DiskIsReady Monitoring for the Disk system is active NetworkingReady True Thu, 12 Dec 2024 06:56:27 +0000 Thu, 12 Dec 2024 06:51:27 +0000 NetworkingIsReady Monitoring for the Networking system is active KernelReady True Thu, 12 Dec 2024 06:56:27 +0000 Thu, 12 Dec 2024 06:51:27 +0000 KernelIsReady Monitoring for the Kernel system is active Addresses: InternalIP: 10.0.142.77 InternalDNS: ip-10-0-142-77.ap-northeast-1.compute.internal Hostname: ip-10-0-142-77.ap-northeast-1.compute.internal Capacity: cpu: 16 ephemeral-storage: 83781432Ki hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 32455708Ki pods: 110 Allocatable: cpu: 15890m ephemeral-storage: 76139225780 hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 30853148Ki pods: 110 System Info: Machine ID: ec2b1408e63c0d220f96abacf8631237 System UUID: ec2b1408-e63c-0d22-0f96-abacf8631237 Boot ID: 6c78faf7-2a3d-44f7-b54b-4f0ba5fa7d47 Kernel Version: 6.1.115 OS Image: Bottlerocket (EKS Auto) 2024.12.8 (aws-k8s-1.30) Operating System: linux Architecture: amd64 Container Runtime Version: containerd://1.7.22+bottlerocket Kubelet Version: v1.30.5-eks-baa6d11 Kube-Proxy Version: v1.30.5-eks-baa6d11 ProviderID: aws:///ap-northeast-1a/i-44444444444444444 Non-terminated Pods: (10 in total) Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age --------- ---- ------------ ---------- --------------- ------------- --- default myapp-5865fb57f-7rsqm 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-9d6k6 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-9g2js 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-bdsvj 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-h9rj9 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-hp9g5 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-r8dzc 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-rp7kx 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-sjwrm 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m default myapp-5865fb57f-x2sdq 1 (6%) 0 (0%) 256M (0%) 0 (0%) 10m Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.) Resource Requests Limits -------- -------- ------ cpu 10 (62%) 0 (0%) memory 2560M (8%) 0 (0%) ephemeral-storage 0 (0%) 0 (0%) hugepages-1Gi 0 (0%) 0 (0%) hugepages-2Mi 0 (0%) 0 (0%) Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Starting 9m46s kube-proxy Normal NodeHasSufficientPID 9m48s (x2 over 9m48s) kubelet Node i-44444444444444444 status is now: NodeHasSufficientPID Normal Starting 9m48s kubelet Starting kubelet. Warning InvalidDiskCapacity 9m48s kubelet invalid capacity 0 on image filesystem Normal NodeHasSufficientMemory 9m48s (x2 over 9m48s) kubelet Node i-44444444444444444 status is now: NodeHasSufficientMemory Normal NodeHasNoDiskPressure 9m48s (x2 over 9m48s) kubelet Node i-44444444444444444 status is now: NodeHasNoDiskPressure Normal NodeAllocatableEnforced 9m48s kubelet Updated Node Allocatable limit across pods Normal NodeReady 9m48s kubelet Node i-44444444444444444 status is now: NodeReady Normal Ready 9m47s karpenter Status condition transitioned, Type: Ready, Status: False -> True, Reason: KubeletReady, Message: kubelet is posting ready status Normal RegisteredNode 9m46s node-controller Node i-44444444444444444 event: Registered Node i-44444444444444444 in Controller Normal Synced 9m46s cloud-node-controller Node synced successfully Normal DisruptionBlocked 9m43s karpenter Cannot disrupt Node: state node is nominated for a pending pod Normal Unconsolidatable 9m3s karpenter Can't replace with a cheaper node
ã§ã¯ããããããã³ã³ã½ã¼ã«ç»é¢ããã¢ããã°ã¬ã¼ããå®è¡ãã¾ãã
Kubernetesãã¼ã¸ã§ã³ã1.30ãã1.31ã¸ã¢ããã°ã¬ã¼ããã¾ãã
ãã¹ã¿ã¼ãã¼ãã®ã¢ããã°ã¬ã¼ããå®äºãã ããã¯ã¼ã«ã¼ãã¼ãã®ã¢ããã°ã¬ã¼ããå§ã¾ãã¾ãã
- ã¢ããã°ã¬ã¼ãã®æ§åãã¯ã¼ã«ã¼ãã¼ãã®å´é¢ããè¦ã¦ããã¾ãã
[cloudshell-user@ip-10-132-78-22 ~]$ kubectl get nodes --watch NAME STATUS ROLES AGE VERSION i-44444444444444444 Ready <none> 96m v1.30.5-eks-baa6d11 i-55555555555555555 NotReady <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 NotReady <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 NotReady <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 0s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 1s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 1s v1.31.1-eks-1b3e656 i-55555555555555555 Ready <none> 4s v1.31.1-eks-1b3e656 i-44444444444444444 Ready <none> 96m v1.30.5-eks-baa6d11 i-44444444444444444 Ready <none> 96m v1.30.5-eks-baa6d11
- æåã«ä½æããã i-44444444444444444 ã«å ããï¼å°ç®ã®ã¯ã¼ã«ã¼ãã¼ã i-55555555555555555 ãä½æãããæå¾ã¯ i-55555555555555555 ãæ®ãã¾ãã
[cloudshell-user@ip-10-132-78-22 ~]$ kubectl get nodes --watch NAME STATUS ROLES AGE VERSION i-55555555555555555 Ready <none> 9m40s v1.31.1-eks-1b3e656
- åæ§ã«ã¢ããã°ã¬ã¼ãã®æ§åãPodã®å´é¢ããè¦ã¦ããã¾ãã
[cloudshell-user@ip-10-132-78-22 ~]$ kubectl get pod --watch NAME READY STATUS RESTARTS AGE myapp-5865fb57f-7jfln 1/1 Running 0 11s myapp-5865fb57f-7rsqm 1/1 Running 0 97m myapp-5865fb57f-9g2js 1/1 Running 0 97m myapp-5865fb57f-btt2j 1/1 Running 0 30s myapp-5865fb57f-d92s5 1/1 Running 0 1s myapp-5865fb57f-gt4l7 1/1 Running 0 13s myapp-5865fb57f-pnn8l 1/1 Running 0 12s myapp-5865fb57f-pvd6r 1/1 Running 0 29s myapp-5865fb57f-vpwzq 1/1 Running 0 1s myapp-5865fb57f-x2sdq 1/1 Running 0 97m myapp-5865fb57f-x2sdq 1/1 Running 0 97m myapp-5865fb57f-x2sdq 1/1 Terminating 0 97m myapp-5865fb57f-x2sdq 1/1 Terminating 0 97m myapp-5865fb57f-s68bm 0/1 Pending 0 0s myapp-5865fb57f-s68bm 0/1 Pending 0 0s myapp-5865fb57f-s68bm 0/1 ContainerCreating 0 0s myapp-5865fb57f-9g2js 1/1 Running 0 97m myapp-5865fb57f-9g2js 1/1 Terminating 0 97m myapp-5865fb57f-9g2js 1/1 Terminating 0 97m myapp-5865fb57f-ljmnx 0/1 Pending 0 0s myapp-5865fb57f-ljmnx 0/1 Pending 0 0s myapp-5865fb57f-x2sdq 0/1 Completed 0 97m myapp-5865fb57f-9g2js 0/1 Completed 0 97m myapp-5865fb57f-ljmnx 0/1 ContainerCreating 0 1s myapp-5865fb57f-s68bm 1/1 Running 0 1s myapp-5865fb57f-x2sdq 0/1 Completed 0 97m myapp-5865fb57f-x2sdq 0/1 Completed 0 97m myapp-5865fb57f-9g2js 0/1 Completed 0 97m myapp-5865fb57f-9g2js 0/1 Completed 0 97m myapp-5865fb57f-ljmnx 1/1 Running 0 2s myapp-5865fb57f-7rsqm 1/1 Running 0 97m myapp-5865fb57f-7rsqm 1/1 Terminating 0 97m myapp-5865fb57f-2rg5j 0/1 Pending 0 0s myapp-5865fb57f-7rsqm 1/1 Terminating 0 97m myapp-5865fb57f-2rg5j 0/1 Pending 0 0s myapp-5865fb57f-2rg5j 0/1 ContainerCreating 0 0s myapp-5865fb57f-7rsqm 0/1 Completed 0 97m myapp-5865fb57f-7rsqm 0/1 Completed 0 97m myapp-5865fb57f-7rsqm 0/1 Completed 0 97m myapp-5865fb57f-2rg5j 1/1 Running 0 1s
- ä¸è¨ã®å±¥æ´ãæ´çããã¨ã以ä¸ã®èµ·åãã¦éããªãï¼ï¼åã®ã¬ããªã«ãèµ·åãããå¯ç¨æ§ã確ä¿ããã¦ãã¾ãã
myapp-5865fb57f-7jfln 1/1 Running 0 11s myapp-5865fb57f-btt2j 1/1 Running 0 30s myapp-5865fb57f-d92s5 1/1 Running 0 1s myapp-5865fb57f-gt4l7 1/1 Running 0 13s myapp-5865fb57f-pnn8l 1/1 Running 0 12s myapp-5865fb57f-pvd6r 1/1 Running 0 29s myapp-5865fb57f-vpwzq 1/1 Running 0 1s myapp-5865fb57f-s68bm 1/1 Running 0 1s myapp-5865fb57f-ljmnx 1/1 Running 0 2s myapp-5865fb57f-2rg5j 1/1 Running 0 1s
ãããã®æ°ãã«çæãããPodã¯ï¼å°ç®ã®ã¯ã¼ã«ã¼ãã¼ãã§å®è¡ããã¦ãããã¨ããããã¾ãã
Kubernetesãã¼ã¸ã§ã³ã 1.31 ã«ãªã£ã¦ãã¾ãã
[cloudshell-user@ip-10-132-78-22 ~]$ kubectl describe node i-55555555555555555 Name: i-55555555555555555 Roles: <none> Labels: app.kubernetes.io/managed-by=eks beta.kubernetes.io/arch=amd64 beta.kubernetes.io/instance-type=c5a.4xlarge beta.kubernetes.io/os=linux eks.amazonaws.com/compute-type=auto eks.amazonaws.com/instance-category=c eks.amazonaws.com/instance-cpu=16 eks.amazonaws.com/instance-cpu-manufacturer=amd eks.amazonaws.com/instance-cpu-sustained-clock-speed-mhz=3300 eks.amazonaws.com/instance-ebs-bandwidth=3170 eks.amazonaws.com/instance-encryption-in-transit-supported=true eks.amazonaws.com/instance-family=c5a eks.amazonaws.com/instance-generation=5 eks.amazonaws.com/instance-hypervisor=nitro eks.amazonaws.com/instance-memory=32768 eks.amazonaws.com/instance-network-bandwidth=5000 eks.amazonaws.com/instance-size=4xlarge eks.amazonaws.com/nodeclass=default failure-domain.beta.kubernetes.io/region=ap-northeast-1 failure-domain.beta.kubernetes.io/zone=ap-northeast-1a k8s.io/cloud-provider-aws=8929092e801005c613d919fa59bb4a6a karpenter.sh/capacity-type=on-demand karpenter.sh/initialized=true karpenter.sh/nodepool=general-purpose karpenter.sh/registered=true kubernetes.io/arch=amd64 kubernetes.io/hostname=i-55555555555555555 kubernetes.io/os=linux node.kubernetes.io/instance-type=c5a.4xlarge topology.ebs.csi.eks.amazonaws.com/zone=ap-northeast-1a topology.k8s.aws/zone-id=apne1-az4 topology.kubernetes.io/region=ap-northeast-1 topology.kubernetes.io/zone=ap-northeast-1a Annotations: alpha.kubernetes.io/provided-node-ip: 10.0.140.203 csi.volume.kubernetes.io/nodeid: {"ebs.csi.eks.amazonaws.com":"i-55555555555555555 "} eks.amazonaws.com/nodeclass-hash: 3809868827326149578 eks.amazonaws.com/nodeclass-hash-version: v1 karpenter.sh/nodepool-hash: 4012513481623584108 karpenter.sh/nodepool-hash-version: v3 node.alpha.kubernetes.io/ttl: 0 volumes.kubernetes.io/controller-managed-attach-detach: true CreationTimestamp: Thu, 12 Dec 2024 08:27:34 +0000 Taints: <none> Unschedulable: false Lease: HolderIdentity: i-55555555555555555 AcquireTime: <unset> RenewTime: Thu, 12 Dec 2024 08:44:03 +0000 Conditions: Type Status LastHeartbeatTime LastTransitionTime Reason Message ---- ------ ----------------- ------------------ ------ ------- MemoryPressure False Thu, 12 Dec 2024 08:43:23 +0000 Thu, 12 Dec 2024 08:27:32 +0000 KubeletHasSufficientMemory kubelet has sufficient memory available DiskPressure False Thu, 12 Dec 2024 08:43:23 +0000 Thu, 12 Dec 2024 08:27:32 +0000 KubeletHasNoDiskPressure kubelet has no disk pressure PIDPressure False Thu, 12 Dec 2024 08:43:23 +0000 Thu, 12 Dec 2024 08:27:32 +0000 KubeletHasSufficientPID kubelet has sufficient PID available Ready True Thu, 12 Dec 2024 08:43:23 +0000 Thu, 12 Dec 2024 08:27:33 +0000 KubeletReady kubelet is posting ready status NetworkingReady True Thu, 12 Dec 2024 08:42:38 +0000 Thu, 12 Dec 2024 08:27:38 +0000 NetworkingIsReady Monitoring for the Networking system is active KernelReady True Thu, 12 Dec 2024 08:42:38 +0000 Thu, 12 Dec 2024 08:27:38 +0000 KernelIsReady Monitoring for the Kernel system is active ContainerRuntimeReady True Thu, 12 Dec 2024 08:42:38 +0000 Thu, 12 Dec 2024 08:27:38 +0000 ContainerRuntimeIsReady Monitoring for the ContainerRuntime system is active StorageReady True Thu, 12 Dec 2024 08:42:38 +0000 Thu, 12 Dec 2024 08:27:38 +0000 DiskIsReady Monitoring for the Disk system is active Addresses: InternalIP: 10.0.140.203 InternalDNS: ip-10-0-140-203.ap-northeast-1.compute.internal Hostname: ip-10-0-140-203.ap-northeast-1.compute.internal Capacity: cpu: 16 ephemeral-storage: 83781432Ki hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 32455708Ki pods: 110 Allocatable: cpu: 15890m ephemeral-storage: 76139225780 hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 30853148Ki pods: 110 System Info: Machine ID: ec24ab668e09345f5f4b1c62388eff05 System UUID: ec24ab66-8e09-345f-5f4b-1c62388eff05 Boot ID: 97d92ddb-bd09-4938-802f-0eb5f57a3042 Kernel Version: 6.1.115 OS Image: Bottlerocket (EKS Auto) 2024.12.8 (aws-k8s-1.31) Operating System: linux Architecture: amd64 Container Runtime Version: containerd://1.7.22+bottlerocket Kubelet Version: v1.31.1-eks-1b3e656 Kube-Proxy Version: v1.31.1-eks-1b3e656 ProviderID: aws:///ap-northeast-1a/i-55555555555555555 Non-terminated Pods: (10 in total) Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age --------- ---- ------------ ---------- --------------- ------------- --- default myapp-5865fb57f-2rg5j 1 (6%) 0 (0%) 256M (0%) 0 (0%) 15m default myapp-5865fb57f-7jfln 1 (6%) 0 (0%) 256M (0%) 0 (0%) 16m default myapp-5865fb57f-btt2j 1 (6%) 0 (0%) 256M (0%) 0 (0%) 16m default myapp-5865fb57f-d92s5 1 (6%) 0 (0%) 256M (0%) 0 (0%) 15m default myapp-5865fb57f-gt4l7 1 (6%) 0 (0%) 256M (0%) 0 (0%) 16m default myapp-5865fb57f-ljmnx 1 (6%) 0 (0%) 256M (0%) 0 (0%) 15m default myapp-5865fb57f-pnn8l 1 (6%) 0 (0%) 256M (0%) 0 (0%) 16m default myapp-5865fb57f-pvd6r 1 (6%) 0 (0%) 256M (0%) 0 (0%) 16m default myapp-5865fb57f-s68bm 1 (6%) 0 (0%) 256M (0%) 0 (0%) 15m default myapp-5865fb57f-vpwzq 1 (6%) 0 (0%) 256M (0%) 0 (0%) 15m Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.) Resource Requests Limits -------- -------- ------ cpu 10 (62%) 0 (0%) memory 2560M (8%) 0 (0%) ephemeral-storage 0 (0%) 0 (0%) hugepages-1Gi 0 (0%) 0 (0%) hugepages-2Mi 0 (0%) 0 (0%) Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Starting 16m kube-proxy Normal NodeHasSufficientPID 16m (x2 over 16m) kubelet Node i-55555555555555555 status is now: NodeHasSufficientPID Normal Starting 16m kubelet Starting kubelet. Warning InvalidDiskCapacity 16m kubelet invalid capacity 0 on image filesystem Normal NodeHasSufficientMemory 16m (x2 over 16m) kubelet Node i-55555555555555555 status is now: NodeHasSufficientMemory Normal NodeHasNoDiskPressure 16m (x2 over 16m) kubelet Node i-55555555555555555 status is now: NodeHasNoDiskPressure Normal NodeAllocatableEnforced 16m kubelet Updated Node Allocatable limit across pods Normal NodeReady 16m kubelet Node i-55555555555555555 status is now: NodeReady Normal Ready 16m karpenter Status condition transitioned, Type: Ready, Status: False -> True, Reason: KubeletReady, Message: kubelet is posting ready status Normal Synced 16m cloud-node-controller Node synced successfully Normal RegisteredNode 16m node-controller Node i-55555555555555555 event: Registered Node i-55555555555555555 in Controller Normal DisruptionBlocked 16m karpenter Cannot disrupt Node: state node is nominated for a pending pod Normal Unconsolidatable 14m karpenter Can't replace with a cheaper node
- ãã¼ã¸ã§ã³1.31ã«ã¢ããã°ã¬ã¼ãããã¾ããã
ã¯ã¼ã«ã¼ãã¼ãã®ã¢ããã°ã¬ã¼ãã®åããã¾ã¨ããã¨ä»¥ä¸ã®ããã«ãªãã¾ãã
- ã¢ããã°ã¬ã¼ãå ãã¼ã¸ã§ã³ã®ã¯ã¼ã«ã¼ãã¼ãã追å ããã
- 稼åä¸ã®Podã¯ä¸æ¦ãTerminate ããã追å ãããã¯ã¼ã«ã¼ãã¼ãã§å度起åããã
- ãã®æãPDBã§æå®ããå¯ç¨æ§ã¯ç¶æããã
- å ¨ã¦ã®Podãåèµ·åãããå¾ããã¨ã®ï¼æ§ãã¼ã¸ã§ã³ï¼ã®ã¯ã¼ã«ã¼ãã¼ããåé¤ããã
ã¢ããªã®å¯ç¨æ§ãç¶æããç¶æ ã§ã¯ã¼ã«ãã¼ããèªåã§ã¢ããã°ã¬ã¼ãã§ãããã¨ã確èªã§ãã¾ããã