Can you explain me the meaning/usage of “–generator=run-pod/v1”
Hi, I am new to the course,
I am creating Pod with kubernetes command
kubectl run redis --image=redis123 --generator=run-pod/v1
Can someone explain me the meaning/usage of “–generator=run-pod/v1”
<@U012ETETF61> welcome, its is way of telling to kube api that we want to create a pod. if you dont mention it will create a deployment.
Ohh okay, thanks. So if i dont add that, later I need to run “kubectl create pod” right??
Not really. A deployment will ultimately create the pods specified in said deployment. You will learn about it in the course, but if you’d like to know more, read about in the https://kubernetes.io/docs/concepts/workloads/controllers/deployment/|documentation
For me to create a pod I use --restart option :
kubectl run mypod --image=nginx --restart=Never ==> for Pod kubectl run mydep --image=nginx ==> for Deployment