- 특정 application pod를 특정 node에서 실행시켜 달라고 요청하는 것.

ex) worker nodes에 gpu=true인 lable만 master node에 요구하여 gpu=true인 것만 실행시켜줌
이때 값은 key: value 형태로 저장이 됌.

답안
- kubectl config use-context k8s
- kubectl get nodes -L disktype ⇒ DISKTYPE에 존재하는 KEY의 값을 얻을 수 있음
- kubectl run eshop-store —image=nginx —dry-run=client -o yaml
- kubectl run eshop-store —image=nginx —dry-run=client -o yaml > eshop-store.yaml
- ls ⇒ 생성 확인
- vi eshop-store.yaml ⇒ spec: 에 넣어기
nodeSelector:
disktype: ssd
⇒ node selector(검색 시 Assign Pods to Nodes로 접속) → Cretae a pod that gets scheduled to your chosen node에 코드 존재
- kubectl apply -f eshop-store.yaml ⇒ 수정된 yaml파일 적
- kubectl describe pods eshop-store ⇒ event부분 확인 → started container eshop-store
강의 답안