``` Hi Admins, just need you help to figure out the issue. In mock exam-1. I h . . .

Ravi Paragi:

Hi Admins, just need you help to figure out the issue. In mock exam-1.  I have created the static pod with "kubectl run static-busybox --image=busybox --command sleep 1000 > /etc/kubernetes/manifests/statix-busybox.yaml". just wanted to know what's wrong.

Tej_Singh_Rana:
Hello, @Ravi Paragi
It should be

$ kubectl run static-busybox --image=busybox --dry-run=client -oyaml --command -- sleep 1000 > /etc/kubernetes/manifests/static-busybox.yaml

Tej_Singh_Rana:
If you don’t add --dry-run=client -oyaml then:

controlplane $ kubectl run static-busybox --image=busybox --command -- sleep 1000 > /etc/kubernetes/manifests/static-busybox.yaml
controlplane $ cat /etc/kubernetes/manifests/static-busybox.yaml
pod/static-busybox created

Ravi Paragi:
Hi @Tej_Singh_Rana - Thanks yor reply. I didnt add --dry-run=client -o yaml.
I think I didnt add ‘–’ before sleep .
But still that worked when I checked in my local. Any thoughts on this. kubectl run static-busybox --image=busybox --command sleep 1000

Tharanath:
kubectl run static-busybox --image=busybox --command sleep 1000 --dry-run=client -o yaml > /etc/kubernetes/manifests/statix-busybox.yaml

Tharanath:
you need to add this --dry-run=client -o yaml directly as static pod means it will create the pod as this : controlplane $ kubectl get po
NAME READY STATUS RESTARTS AGE
static-busybox-controlplane 1/1 Running 0 7s

Tharanath:
which will contain the name of the node at the end

Tej_Singh_Rana:
That’s why I provided two examples, If you add --dry-run or not. Please take a look and figure out.
In case, if you have to save the manifest file in the given location then?

Ravi Paragi:
Hi @Tej_Singh_Rana, I understood what wrong with me :slightly_smiling_face: Thank you and @Tharanath I was not redirecting the file. It was just running was normal.