Exercise 9.4: Use Labels to Manage Resources
CP 노드에 연결된 터미널로 이동
system=secondary Label을 가진 모든 Pod 삭제
kubectl delete pods -l system=secondary --all-namespaces
accounting Namespace에 있는 Pod 목록 확인
kubectl -n accounting get pods
accounting Namespace에 있는 Deployment 목록 및 부여된 Label 확인
kubectl -n accounting get deploy --show-labels
accounting Namespace에 있는 Deployment 중에서 system=secondary Label을 가진 Deployment 삭제
kubectl -n accounting delete deploy -l system=secondary
노드에 부여된 Label 확인
kubectl get node --show-labels
Worker 노드에 부여된 Label 중에서 키값이 system 인 Label 삭제
kubectl label node worker system-
리소스 삭제
{ kubectl delete deploy nginx kubectl delete svc nginx kubectl delete svc nginx-one -n accounting kubectl delete ns accounting }
Last updated