date
시간 동기화 해주세요sudo rdate -s time.bora.net
Pod (기본 배포 단위)
Pod vs Service
docker run -p
와 같다. kubectl logs [파드 이름]
-f 옵션
: --follow
, 주면 실시간 로그 확인 가능kubectl apply
후 kubectl get po -o wide
했을 때 running이 안 뜬다면? => kubectl logs mongo-pod[파드이름]
으로 로그를 확인한다.yji@k8s-master:~/LABs/mydb$ vim mongodb-pod.yaml
yji@k8s-master:~/LABs/mydb$ kubectl apply -f mongodb-pod.yaml
pod/mongo-pod created
yji@k8s-master:~/LABs/mydb$ kubectl get po -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
mongo-pod 1/1 Running 0 11s 10.109.131.22 k8s-node2 <none> <none>
yji@k8s-master:~/LABs/mydb$ kubectl get po,svc -o wide --show-labels | grep mongo
⭐pod/mongo-pod 1/1 Running 0 18m 10.109.131.22 k8s-node2 <none> <none> ⭐db=mongodb⭐
⭐service/mongo-svc ClusterIP 10.102.58.37 192.168.56.102 17017/TCP 11m ⭐db=mongodb⭐ <none>
# mongoDB pod + Service
apiVersion: v1
kind: Pod
metadata:
name: mongo-pod
labels:
db: mongodb
spec:
containers:
- image: mongo:4.0
name: mydb-mongo
ports:
- containerPort: 27017
---
apiVersion: v1
kind: Service
metadata:
name: mongo-svc
spec:
selector:
db: mongodb # Pod의 K-V 그대로 사용해라.
ports:
- port: 17017
targetPort: 27017
externalIPs:
- 192.168.56.102 # kubectl get po -o wide로 pod가 어떤 노드에 띄워졌는지 확인 후 해당 노드의 IP를 externalIPs를 적어준다.
# kubectl api-resources | grep pod
# label : Service를 위해서 필요하다 ~
kubectl exec -it mongo-pod -- mongo
> use k8sDB
switched to db k8sDB
> db
k8sDB
> db.k8scollection.insert({name: "yji", job:"Student"})
WriteResult({ "nInserted" : 1 })
> db.k8scollection.find()
{ "_id" : ObjectId("633b803cd87ff824ae388968"), "name" : "yji", "job" : "Student" }
아래와 같이 Connection 생성
데이터 확인
kubectl describe
== docker images history
yji@k8s-master:~/LABs/mydb$ kubectl describe svc mongo-svc
Name: mongo-svc
Namespace: default
Labels: <none>
Annotations: <none>
Selector: db=mongodb
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.102.58.37
IPs: 10.102.58.37
External IPs: 192.168.56.102
Port: <unset> 17017/TCP
TargetPort: 27017/TCP
⭐Endpoints: 10.109.131.22:27017⭐
Session Affinity: None
Events: <none>
yji@k8s-master:~/LABs/mydb$ curl 10.109.131.22:27017
It looks like you are trying to access MongoDB over HTTP on the native driver port.
yji@k8s-master:~/LABs/mydb$ curl 192.168.56.102:17017
It looks like you are trying to access MongoDB over HTTP on the native driver port.
kubectl get po -o wide
로 pod 상태 확인 후에
kubectl logs mydb-pod
vi mysql-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: mydb-pod
labels:
db: mysql
spec:
containers:
- image: mysql:5.7
name: mydb-mysql
ports:
- containerPort: 3306
kubectl apply -f mysql-pod.yaml
yji@k8s-master:~/LABs/mydb$ kubectl logs mydb-pod
2022-10-04 01:08:47+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.39-1.el7 started.
2022-10-04 01:08:47+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-10-04 01:08:47+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.39-1.el7 started.
2022-10-04 01:08:48+00:00 ⭐ [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
You need to specify one of the following:
- MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD
⭐ 환경 변수를 꼭 가져야한다는 내용의 에러
---
환경변수 넣어준 후에 다시 kubectl apply
cd goapp
1. Dockerfile로 goapp build
2. docker run test
3. docker push
--- GKE
4. Pod, Service yaml 파일 생성
5. kubectl apply -f
6. kubectl get po,svc -o wide로 external-ip 확인
7. 접속
cd whatismymotto/
1. Docekrfile 작성 -> nginx
FROM nginx:1.23-alpine
COPY . /usr/share/nginx/html
2. docker run test
3. docker push
--- GKE
4. devweb.yaml 파일 작성
apiVersion: apps/v1
kind: Deployment
metadata:
name: devweb-deployment
spec:
selector:
matchLabels:
app: my-devweb
replicas: 3
template:
metadata:
labels:
app: my-devweb
spec:
containers:
- name: devweb-containers
image: ur2e/motto:1.0
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: devweb-svc
spec:
selector:
app: my-devweb
ports:
- port: 8090
targetPort: 80
type: LoadBalancer
5. kubectl apply -f devweb.yaml
6. kubectl get po,svc -o wide
7. ⭐ 꼭 서비스 삭제하기 ~~ 돈 나간다.
컨테이너를 배포하는 기본적인 단위
우리는 pod 말고 Deployment 쓴다... ?
Pod
추상화 object
yji@k8s-master:~$ kubectl api-resources | grep -i deploy
deployments deploy ✍apps/v1 true ✍Deployment
✍ apps/v1 : Version
✍ Deployment: kind
calicoctl ipam show
: block도 볼라면 --show-block 옵션 추가
calico = network plugin ... pod의 IP 가지고 있어 ?
docker images history
yji@k8s-master:~$ sudo docker image history mysql:5.7
IMAGE CREATED CREATED BY SIZE COMMENT
aa803eda0f25 11 days ago /bin/sh -c #(nop) CMD ["mysqld"] 0B
<missing> 11 days ago /bin/sh -c #(nop) EXPOSE 3306 33060 0B
DevSecOps.. 데브옵스 중간에는 항상 보안이 있다.
sudo docker pull dbgurum/k8s-lab:p8080
kubectl apply -f multi-pod.yaml
kubectl exec -it multi-pod -c c1 -- hostname
kubectl exec -it multi-pod -c c2 -- hostname
kubectl exec -it multi-pod -c c1 -- bash
curl localhost:8000
kubectl exec -it multi-pod -c c2 -- bash
curl localhost:8080
--- multi-pod2.yaml
yji@k8s-master:~/LABs/multipod$ kubectl logs multi-pod2 -c c1
yji@k8s-master:~/LABs/multipod$ kubectl logs multi-pod2 -c c2
events.js:187
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::8080
1. yaml 파일 작성
# command = args = command + args
yji@k8s-master:~/LABs/multipod$ kubectl get po -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
net-pod1 1/1 Running 0 3m15s 10.111.156.90 k8s-node1 <none> <none>
net-pod2 1/1 Running 0 3m15s 10.111.156.91 k8s-node1 <none> <none>
yji@k8s-master:~/LABs/multipod$ kubectl exec -it net-pod1 -- bash
## 자기 자신의 ip 확인하기
root@net-pod1:/# ip a
4: ⭐ eth0@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1480 qdisc noqueue state UP group default
link/ether 6a:37:25:2e:33:bd brd ff:ff:ff:ff:ff:ff
inet ⭐10.111.156.90/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::6837:25ff:fe2e:33bd/64 scope link
valid_lft forever preferred_lft forever
ping 10.111.156.91 # pod1에서 pod2로 ping 던지기
## node1에서
### cali 확인
yji@k8s-node1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 enp0s3
default _gateway 0.0.0.0 UG 20101 0 0 enp0s8
10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
10.108.82.192 k8s-master 255.255.255.192 UG 0 0 0 tunl0
10.109.131.0 k8s-node2 255.255.255.192 UG 0 0 0 tunl0
10.111.156.64 0.0.0.0 255.255.255.192 U 0 0 0 *
10.111.156.80 0.0.0.0 255.255.255.255 UH 0 0 0 cali1c7fdf70042
10.111.156.81 0.0.0.0 255.255.255.255 UH 0 0 0 cali08675f58a84
10.111.156.82 0.0.0.0 255.255.255.255 UH 0 0 0 calif7a9406fb5c
10.111.156.83 0.0.0.0 255.255.255.255 UH 0 0 0 cali8b56182ddcf
10.111.156.84 0.0.0.0 255.255.255.255 UH 0 0 0 calie5c5b803bf4
10.111.156.90 0.0.0.0 255.255.255.255 UH 0 0 0 cali75567eb3d27
10.111.156.91 0.0.0.0 255.255.255.255 UH 0 0 0 cali153dd8aa6e6
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s8
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.56.0 0.0.0.0 255.255.255.0 U 101 0 0 enp0s8
### ?? 10.0.2.15: NAT ip? enp0s3의 ip
### 한 마디로 169~ 외부 게이트웨이, 10.0~ 내부 게이트웨이
yji@k8s-master:~$ kubectl exec -it net-pod1 -- bash
root@net-pod1:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 169.254.1.1 0.0.0.0 UG 0 0 0 eth0
169.254.1.1 * 255.255.255.255 UH 0 0 0 eth0
root@net-pod1:/# arp -an
? (10.0.2.15) at ee:ee:ee:ee:ee:ee [ether] on eth0
? (169.254.1.1) at ee:ee:ee:ee:ee:ee [ether] on eth0
---
pod 2 의 route와 pod1의 route는 값이 같다 ....
root@net-pod2:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 169.254.1.1 0.0.0.0 UG 0 0 0 eth0
169.254.1.1 * 255.255.255.255 UH 0 0 0 eth0
echo '0' > cali xxx/proxy_arp... (이게 po1 이여.. pod2여 ..?
cd /proc/sys/net/ipv4/conf
root@k8s-node1:/proc/sys/net/ipv4/conf# sudo echo '0' > cali153dd8aa6e6/proxy_arp
-> 이렇게하면 pod1에서 pod2로 핑 보내는게 멈춘다 !
-> why? pod2에서 응답 ?? 하는게 없음 !
-> 다시 되돌리라면 sudo echo '1' > cali153dd8aa6e6/proxy_arp
64 bytes from 10.111.156.91: icmp_seq=1054 ttl=63 time=0.106 ms
64 bytes from 10.111.156.91: icmp_seq=1089 ttl=63 time=1023 ms
tunl :
calico
3->4로 ping
## 1번 노드
yji@k8s-node1:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.109.131.0 k8s-node2 255.255.255.192 UG 0 0 0 tunl0
## 2번 노드
yji@k8s-node2:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.111.156.64 k8s-node1 255.255.255.192 UG 0 0 0 tunl0
tcpdump -i emp0s8 -nn proto 4 -w calico-tunl-ipip.pcap
Pod - Label
key: value 구조로 작성, 여러 개 지정이 가능, 복합적 의미를 지정 가능
Pod를 식별
pod1, pod2, pod3 -> 동일한 label 부여 하고 -> service에 연결 ->하면 그룹화 ! , LB
라벨 조회 (Pod의 라벨)
node에도 label 설정이 유용
# node의 라벨 확인
yji@k8s-master:~/LABs/multipod$ kubectl describe no k8s-node1
Name: k8s-node1
Roles: <none>
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
⭐kubernetes.io/hostname=k8s-node1⭐
kubernetes.io/os=linux
label의 확장판(확장 기능을 제공)
annotations
: 라벨 키밸류의 식별과 그룹화 밖에 안되는데,annotations
는 추가적인 메타정보를 제공 Pod -
type: infra1 이 selector: type: infra1에 의해서 묶여진다.
pod ip 3개뜨는거 확인해라 .
우리 지금까지는 namespace 지정 안함
## namespace 생성
yji@k8s-master:~/LABs/multipod$ kubectl create namespace infra-team-ns1
namespace/infra-team-ns1 created
## 생성한 namespace 조회
yji@k8s-master:~/LABs/multipod$ kubectl get namespaces
NAME STATUS AGE
default Active 5d1h
infra-team-ns1 Active 25s
# 파드 및 서비스 생성
yji@k8s-master:~/LABs/label$ kubectl apply -f label-1.yaml
pod/label-pod-a created
pod/label-pod-b created
pod/label-pod-c created
service/infra-svc1 created
# 생성한 파드 및 서비스 조회
yji@k8s-master:~/LABs/label$ kubectl get po,svc -o wide -n infra-team-ns1
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/label-pod-a 1/1 Running 0 8m12s 10.109.131.28 k8s-node2 <none> <none>
pod/label-pod-b 1/1 Running 0 8m12s 10.111.156.97 k8s-node1 <none> <none>
pod/label-pod-c 1/1 Running 0 8m11s 10.109.131.29 k8s-node2 <none> <none>
pod/label-pod-x 1/1 Running 0 69s 10.109.131.30 k8s-node2 <none> <none>
pod/label-pod-y 1/1 Running 0 69s 10.111.156.98 k8s-node1 <none> <none>
pod/label-pod-z 1/1 Running 0 69s 10.111.156.99 k8s-node1 <none> <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/infra-svc1 ClusterIP 10.99.85.32 <none> 7777/TCP 8m11s type=infra1
service/infra-svc2 ClusterIP 10.104.70.153 <none> 7778/TCP 69s type=infra2
yji@k8s-master:~/LABs/label$ kubectl get all -n infra-team-ns1
NAME READY STATUS RESTARTS AGE
pod/label-pod-a 1/1 Running 0 7m46s
pod/label-pod-b 1/1 Running 0 7m46s
pod/label-pod-c 1/1 Running 0 7m45s
pod/label-pod-x 1/1 Running 0 43s
pod/label-pod-y 1/1 Running 0 43s
pod/label-pod-z 1/1 Running 0 43s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/infra-svc1 ClusterIP 10.99.85.32 <none> 7777/TCP 7m45s
service/infra-svc2 ClusterIP 10.104.70.153 <none> 7778/TCP 43s
⭐ Endpoint 확인하기 ! !
yji@k8s-master:~/LABs/label$ kubectl describe service/infra-svc1 -n infra-team-ns1
Name: infra-svc1
Namespace: infra-team-ns1
Labels: <none>
Annotations: <none>
Selector: type=infra1
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.99.85.32
IPs: 10.99.85.32
Port: <unset> 7777/TCP
TargetPort: 7777/TCP
⭐ Endpoints: 10.109.131.28:7777,10.109.131.29:7777,10.111.156.97:7777
Session Affinity: None
Events: <none>
yji@k8s-master:~/LABs/label$ kubectl describe service/infra-svc2 -n infra-team-ns1
Name: infra-svc2
Namespace: infra-team-ns1
Labels: <none>
Annotations: <none>
Selector: type=infra2
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.104.70.153
IPs: 10.104.70.153
Port: <unset> 7778/TCP
TargetPort: 7778/TCP
Endpoints: 10.109.131.30:7778,10.111.156.98:7778,10.111.156.99:7778
Session Affinity: None
Events: <none>
yji@k8s-master:~/LABs/label$ kubectl get pods --show-labels -n infra-team-ns1
NAME READY STATUS RESTARTS AGE LABELS
label-pod-a 1/1 Running 0 8m35s type=infra1
label-pod-b 1/1 Running 0 8m35s type=infra1
label-pod-c 1/1 Running 0 8m34s type=infra1
label-pod-x 1/1 Running 0 92s type=infra2
label-pod-y 1/1 Running 0 92s type=infra2
label-pod-z 1/1 Running 0 92s type=infra2
yji@k8s-master:~/LABs/label$ kubectl get pods --selector='type' -n infra-team-ns1
\NAME READY STATUS RESTARTS AGE
label-pod-a 1/1 Running 0 8m45s
label-pod-b 1/1 Running 0 8m45s
label-pod-c 1/1 Running 0 8m44s
label-pod-x 1/1 Running 0 102s
label-pod-y 1/1 Running 0 102s
label-pod-z 1/1 Running 0 102s
이제 Pod 6개 만들건데
서비스에 selector를 만들 때 원하는 라벨만 선택하면 된다 ~
vim multi-label.yaml
apiVersion: v1
kind: Pod
metadata:
name: label-infra-web
labels:
type: infra
job: web
spec:
containers:
- name: p1-container
image: dbgurum/k8s-lab:initial
---
apiVersion: v1
kind: Pod
metadata:
name: label-infra-db
labels:
type: infra
job: db
spec:
containers:
- name: p2-container
image: dbgurum/k8s-lab:initial
---
apiVersion: v1
kind: Pod
metadata:
name: label-infra-svc
labels:
type: infra
job: svc
spec:
containers:
- name: p3-container
image: dbgurum/k8s-lab:initial
---
apiVersion: v1
kind: Pod
metadata:
name: label-dev-web
labels:
type: dev
job: web
spec:
containers:
- name: p4-container
image: dbgurum/k8s-lab:initial
---
apiVersion: v1
kind: Pod
metadata:
name: label-dev-db
labels:
type: dev
job: db
spec:
containers:
- name: p5-container
image: dbgurum/k8s-lab:initial
---
apiVersion: v1
kind: Pod
metadata:
name: label-dev-svc
labels:
type: dev
job: svc
spec:
containers:
- name: p6-container
image: dbgurum/k8s-lab:initial
---
# frontend web 개발자
apiVersion: v1
kind: Service
metadata:
name: front-web-svc
spec:
selector:
job: web
ports:
- port: 8081
---
# 운영팀
apiVersion: v1
kind: Service
metadata:
name: infra-svc
spec:
selector:
type: infra
ports:
- port: 8082
---
# infra팀의 웹개발
apiVersion: v1
kind: Service
metadata:
name: infra-web-svc
spec:
selector:
job: web
type: infra
ports:
- port: 8083
yji@k8s-master:~/LABs/label$ kubectl describe svc/infra-svc
Name: infra-svc
IP: 10.101.164.249
IPs: 10.101.164.249
Port: <unset> 8082/TCP
TargetPort: 8082/TCP
Endpoints: 10.109.131.34:8082,10.111.156.103:8082,10.111.156.104:8082
yji@k8s-master:~/LABs/label$ kubectl describe svc/front-web-svc
Name: front-web-svc
IP: 10.109.47.1
IPs: 10.109.47.1
Port: <unset> 8081/TCP
TargetPort: 8081/TCP
Endpoints: 10.109.131.35:8081,10.111.156.104:8081
yji@k8s-master:~/LABs/label$ kubectl describe svc/infra-web-svc
Name: infra-web-svc
IP: 10.110.48.29
IPs: 10.110.48.29
Port: <unset> 8083/TCP
TargetPort: 8083/TCP
Endpoints: 10.111.156.104:8083
kube-scheduler-k8s-master
에 의해 특정 계산 알고리즘으로 노드가 할당, 지정### kubelet을 통해 직접 할당하는 기법
spec:
nodeName: k8s-node1
### control plane, scheduler에 의해 할당되는 방식
spec:
nodeSelector:
kubernetes.io/hostname: k8s-node2
yji@k8s-master:~/LABs/labels$ vi pod-label-1.yaml
yji@k8s-master:~/LABs/labels$ kubectl apply -f pod-label-1.yaml
pod/mynode-pod1 created
pod/mynode-pod2 created
yji@k8s-master:~/LABs/labels$ kubectl get po -o wide | grep mynode
mynode-pod1 1/1 Running 0 88s 10.111.156.107 k8s-node1 <none> <none>
mynode-pod2 1/1 Running 0 88s 10.109.131.36 k8s-node2 <none> <none>
## yaml 까보기
kubectl get po mynode-pod1 -o yaml
# ✍ 보기 불편하니까 리다이렉션해서 보기
yji@k8s-master:~/LABs/labels$ kubectl get po mynode-pod1 -o yaml > mynode-pod1.yaml
yji@k8s-master:~/LABs/labels$ vim mynode-pod1.yaml
> 파드 삭제하면 30초동안 기다린다(?)
terminationGracePeriodSeconds: 30
# 이런 정보도 볼 수 있어요
yji@k8s-master:~/LABs/labels$ kubectl get po mynode-pod2 -o yaml | grep -i nodename
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"mynode-pod2","namespace":"default"},"spec":{"containers":[{"image":"dbgurum/k8s-lab:initial","name":"mynode-container","ports":[{"containerPort":8000}]}],"nodeName":"k8s-node2"}}
nodeName: k8s-node2
라벨 만들고
1) (k8s-node1) : disktype=ssd인 worker node에 pod를 지정하고자 한다.
yji@k8s-master:~/LABs/label$ kubectl label nodes k8s-node1 disktype=ssd
node/k8s-node1 labeled
yji@k8s-master:~/LABs/label$ kubectl get no k8s-node1 --show-labels
NAME STATUS ROLES AGE VERSION LABELS
k8s-node1 Ready <none> 5d2h v1.24.5 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,⭐disktype=ssd⭐,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node1,kubernetes.io/os=linux
yji@k8s-master:~/LABs/labels$ cat node-label-1.yaml
apiVersion: v1
kind: Pod
metadata:
name: mynode-pod3
⭐spec:
⭐nodeSelector:
⭐disktype: ssd
nodeName: k8s-node1
containers:
- name: mynode-container
image: dbgurum/k8s-lab:initial
ports:
- containerPort: 8000
2) (k8s-node2) : GPU로 운영 중('gpu=true')인 worker node를 pod에 지정해야 한다.
yji@k8s-master:~/LABs/labels$ kubectl label nodes k8s-node2 gpu=true
node/k8s-node2 labeled
yji@k8s-master:~/LABs/labels$ kubectl get no
k8s-node2 --show-labels
NAME STATUS ROLES AGE VERSION LABELS
k8s-node2 Ready <none> 5d2h v1.24.5 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,⭐gpu=true,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node2,kubernetes.io/os=linux
cat label_gpu_node.yaml
apiVersion: v1
kind: Pod
metadata:
name: mynode-pod4
spec:
nodeSelector:
gpu: ⭐"true"⭐ : bool타입이라 ""로 묶어야한다.
nodeName: k8s-node2
containers:
- name: mynode-container
image: dbgurum/k8s-lab:initial
ports:
- containerPort: 8001
yji@k8s-master:~/LABs/labels$ kubectl apply -f label_gpu_node.yaml
pod/mynode-pod4 created
## 📕 라벨 삭제
yji@k8s-master:~/LABs/labels$ kubectl label nodes k8s-node1 disktype-
node/k8s-node1 unlabeled
yji@k8s-master:~/LABs/labels$ kubectl label nodes k8s-node2 gpu-
node/k8s-node2 unlabeled
🐳 📕 ⭐ 📔 💭 🤔 ✍