Hey Guys, Is there a single command to keep this running, I tried the below comm . . .

Ravi Sharma:
Hey Guys,
Is there a single command to keep this running, I tried the below command but the answer was wrong at the end. I created a path /etc/kubelet.d and ran it over there.
kubectl run --generator=run-pod/v1 static-busybox --image=busybox sleep 1000


static.JPG

SHANKAR NAG MACHIRAJU:
Try … kubectl run static-busybox --image=busybox --generator=run-pod/v1 – /bin/sh -c “sleep 1000” and redirect it to a file and place under static pod path

Ravi Sharma:
The output is same as mine, I am running this command in Master Node in /etc/kubelet.d path also I believe in case of static pod -master appends automatically to the pod name.

prashant:
place the pod yaml to static path in master node , kubelet on master node will start it.you should not create it by run cmd

Rahul Soni:
Whatever node you are running the static pd, that node name is automatically appended.

Ravi Sharma:
prashant the static path is /etc/kubelet.d right ? or is there any other path as well ?

Rahul Soni:
You have to check in kubelet config.xml

Ideally it is /etc/Kubernetes/manifests

Ravi Sharma:
will do, thanks Rahul Soni

prashant:
Ravi Sharma run ps -auz|grep kubelet look for static if not there look for --config. Static is direct path where as in config you have to again look for the static location