cd Labels-selector-node-selector-30-12-2025
ll
vim pod-label.yml
kubectl create -f pod-label.yml
vim pod-label.yml
kubectl create -f pod-label.yml
vim pod-label.yml
kubectl create -f pod-label.yml
kubectl get po --show-labels
git add *
git commit -m "add labels to pod" .
git push origin main
kubectl run pod2 --image=nginx
kubectl run pod3 --image-nginx
kubectl run pod3 --image=nginx
kubectl run pod4 --image=nginx
kubectl describe pod pod2
kubectl get po --show-labels
kubectl label pod pod2 "client=tcs" "env=test"
kubectl get po --show-labels
kubectl label po pod2 run-
kubectl get po --show-labels
kubectl label po pod1 run-
kubectl label pod pod3 "client=wipro" "env=dev"
kubectl get po --show-labels
kubectl get po --show-labels
kubectl get po -l client=tcs
kubectl get po -l 'env in (dev,test)'
kubectl get po --show-labels
kubectl get po -l 'env in (dev,test)'
kubectl get po -l 'env in (dev)'
kubectl get po -l 'env notin (dev)'
history
kubectl label pod pod4 "client=inf" "env=test"
kubectl get po --show-labels
kubectl get po pod3 run-
kubectl label pod run-
kubectl label pod pod3 run-
mkdir node-selector cd node-selector touch pod.yml vim pod.yml kubectl create -f pod.yml pod.yml vim pod.yml kubectl create -f pod.yml vim pod.yml kubectl create -f pod.yml ll vim pod.yml kubectl create -f pod.yml kubectl get po ll kubectl get po kubectl describe pod5 kubectl describe pod pod5 kubectl get nodes kubectl get po -o wide kubectl get nodes --show-labels kubectl label node minikube year="2025" kubectl get nodes -o wide kubectl get nodes --show-labels vim pod.yml kubectl get nodes --show-labels vim pod.yml kubectl create -f pod.yml kubectl get po -o wide vim pod.yml kubectl create -f pod.yml kubectl get po -o wide vim pod.yml kubectl create -f pod.yml kubectl get po kubectl describe pod pod8 vim pod.yml kubectl get po -o wide git pull origin main git add * git commit -m "node-selector pod file created" pod.yml history