가시다님 스터디 쿠버네티스편 [1주차]

강재민·2023년 1월 13일
0

Kubernetes

목록 보기
26/29

[과제 1]

각자 설치한 AWS kOps 클러스터의 정보를 올려주세요
kops get cluster

NAME            CLOUD   ZONES
repush.click    aws     ap-northeast-2a,ap-northeast-2c

kops get instances


ID                      NODE-NAME               STATUS          ROLES   STATE   INTERNAL-IP     INSTANCE-GROUP                                      MACHINE-TYPE
i-0293449ed543da089     i-0293449ed543da089     UpToDate        master          172.30.56.41    master-ap-northeast-2a.masters.repush.click t3.medium
i-0785c725053671731     i-0785c725053671731     UpToDate        node            172.30.41.151   nodes-ap-northeast-2a.repush.click          t3.medium
i-0b95f3ec7338e914e     i-0b95f3ec7338e914e     UpToDate        node            172.30.74.170   nodes-ap-northeast-2c.repush.click          t3.medium

[과제 2]


[과제 3]

워커 노드 증가(ASG = Auto Scaling Group 활용)

[root@kops-ec2 ~]# kops get ig
NAME                    ROLE    MACHINETYPE     MIN     MAX     ZONES
master-ap-northeast-2a  Master  t3.medium       1       1       ap-northeast-2a
nodes-ap-northeast-2a   Node    t3.medium       1       1       ap-northeast-2a
nodes-ap-northeast-2c   Node    t3.medium       1       1       ap-northeast-2c
[root@kops-ec2 ~]# kops edit ig nodes-ap-northeast-2a
[root@kops-ec2 ~]# kops update cluster --yes
W0113 18:33:13.925707   22565 builder.go:231] failed to digest image "602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni-init:v1.11.4"
W0113 18:33:14.440442   22565 builder.go:231] failed to digest image "602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.11.4"
I0113 18:33:19.378257   22565 executor.go:111] Tasks: 0 done / 103 total; 48 can run
I0113 18:33:20.151880   22565 executor.go:111] Tasks: 48 done / 103 total; 21 can run
I0113 18:33:20.891997   22565 executor.go:111] Tasks: 69 done / 103 total; 28 can run
I0113 18:33:21.399682   22565 executor.go:111] Tasks: 97 done / 103 total; 3 can run
I0113 18:33:21.686595   22565 executor.go:111] Tasks: 100 done / 103 total; 3 can run
I0113 18:33:21.757683   22565 executor.go:111] Tasks: 103 done / 103 total; 0 can run
I0113 18:33:22.359233   22565 dns.go:238] Pre-creating DNS records
I0113 18:33:22.417023   22565 update_cluster.go:326] Exporting kubeconfig for cluster
kOps has set your kubectl context to repush.click
W0113 18:33:22.431343   22565 update_cluster.go:350] Exported kubeconfig with no user authentication; use --admin, --user or --auth-plugin flags with `kops export kubeconfig`

Cluster changes have been applied to the cloud.


Changes may require instances to restart: kops rolling-update cluster
[root@kops-ec2 ~]# kops rolling-update cluster
NAME                    STATUS  NEEDUPDATE      READY   MIN     TARGET  MAX     NODES
master-ap-northeast-2a  Ready   0               1       1       1       1       1
nodes-ap-northeast-2a   Ready   0               1       2       2       3       1
nodes-ap-northeast-2c   Ready   0               1       1       1       1       1
[root@kops-ec2 ~]# kubectl get node
NAME                  STATUS     ROLES           AGE   VERSION
i-027ea88e3d9ee382b   NotReady   node            15s   v1.24.9
i-0293449ed543da089   Ready      control-plane   89m   v1.24.9
i-0785c725053671731   Ready      node            88m   v1.24.9
i-0b95f3ec7338e914e   Ready      node            88m   v1.24.9

0개의 댓글