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
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
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.
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
Whatever node you are running the static pd, that node name is automatically appended.
prashant the static path is /etc/kubelet.d right ? or is there any other path as well ?
You have to check in kubelet config.xml
Ideally it is /etc/Kubernetes/manifests
will do, thanks Rahul Soni
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