Sidd:
what exactly does this command do? I ran and nothing happened
Tej_Singh_Rana:
Hello, @Sidd
> kubectl run redis --image redis123 --dry-run=client -o yaml > redis.yaml
It will create a manifest file for pod redis.
and we used redirect (>) symbol to store that content into redis.yaml file.
If you don’t wanna store and wanna see difference then do without redirection symbol :
kubectl run redis --image redis123 --dry-run=client -o yaml
Hi @Tej_Singh_Rana ,
what does ‘-o’ in the command signify here…?
and do we set image name using --image flag …?
Hello @sonal.kumar98
Yes, we set the image name by using the --image
flag.
and -o stands for output.
suppose you created a pod for nginx image and you wanna see complete outputs of that pod then use the -o
flag: -
kubectl run nginx --image=nginx
--
kubectl get po nginx -oyaml
you can get output in yaml or in json.
We explained very well in the pod lecture.
What does the parameter --dry-run=client signifies?