CKA &. CKAD/Scheduling

Manual Scheduling

Clark Shim 2021. 3. 25. 18:54

ㅁ A pod definition file nginx.yaml is given. Create pod using the file.

kubectl apply -f nginx.yaml

 

ㅁ What is the status of the created POD?

kubectl get pods

 

ㅁ Why is the POD in a pending state?

kubectl -n kube-system get pods

kubectl describe pod nginx

 

ㅁ Manually schedule the pod on node01

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  nodeName: node01
  containers:
  - image: nginx
    name: nginx
kubectl apply -f nginx.yaml

ㅁ Now schedule the same pod on the master node

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  nodeName: master
  containers:
  - image: nginx
    name: nginx
kubectl apply -f nginx.yaml