I am kubernetes newbie, and I have a basic question
my understanding from https://kubernetes.io/docs/reference/kubectl/conventions/ is , we can generate yaml templates using "kubernetes run" command
But when I tried doing same, it didn't work
Not sure if my understanding is wrong or something wrong in my command
You're just missing a few flags.
The command should be
kubectl run <podname> --image <imagename:tag> --dry-run -o yaml --generator=run-pod/v1
for example:
kubectl run helloworld --image=helloworld --dry-run -o yaml --generator=run-pod/v1
You need to specify all the required flags, in this case --image=...