In this training, we will learn to create a customized Pod.
Navigate to the folder
03_cmd-and-args
from CLI, before you get started.
cat pod.yaml
kubectl create -f pod.yaml
kubectl get pods
Why is the Pod not in
RUNNING
state?
Pay attention to the structure
Last State:
.
kubectl describe pod my-pod | grep -A4 "Last State:"
...
- name: busybox
image: busybox:1.32.0
command: [ "sleep" ]
args: [ "600" ]
kubectl replace --force -f pod.yaml
Verify the pod state if running or not using
kubectl get pods
command. You will observe that issue is resolved and pod is in running state.
- Delete the created resource - pod.
kubectl delete pod my-pod