Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to generate blank kubernetes yaml?

Is there any kubectl command to bootstrap yaml file for certain object?

For example

kubectl generate deployment --yml

After which I would fill it with values I want.

Thanks

like image 379
Marko Bogdanović Avatar asked Oct 14 '17 21:10

Marko Bogdanović


1 Answers

You could try playing with:

kubectl create <resourcetype> <otheroptions> --output=yaml --dry-run

See:

  • https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#create

for different <resourcetype> you could use this with.

like image 185
Graham Dumpleton Avatar answered Nov 18 '22 23:11

Graham Dumpleton