02 - Manual Scheduling
Q: Manually schedule the pod on "node01" kubectl replace --force = kubectl delete + kubectl create Method 1: kubectl replace $ vim nginx.yaml $ kubectl replace --force -f nginx.yaml --- apiVersion: v1 kind: Pod metadata: name: nginx spec: nodeName: node01 containers: - image: nginx name: nginx Method 2: kubectl delete + kubectl create Delete the existing pod first. $ kubectl delete po nginx To list and know the names of available nodes on the cluster: $ kubectl get nodes Add the "nodeName" field under the spec section in the nginx.yaml file with " node01 " as the value: --- apiVersion: v1 kind: Pod metadata: name: nginx spec: nodeName: node01 containers: - image: nginx name: nginx Create a pod from the definition...