There must be "full-configuration" and example templates of Kubernetes YAML configs somewhere with comments itemizing what parameters do what with runnable examples somewhere.
Does anyone know where something like this might be? Or where the "full API" of the most commonly used Kubernetes components are?
There is documentation for every k8s api version available, for example check this link.
The way I found what every key in yaml file represent and what does it mean is via kubectl explain
command.
For example:
$kubectl explain deploy.spec
Trick I use while doing CKAD to see full list could be:
$kubectl explain deploy --recursive > deployment_spec.txt
This will list all available options for kubernetes deployment that could you use in yaml file.
To generate some template there is option to use --dry-run
and -o yaml
in kubectl
command, for example to create template for CronJob:
$kubectl run cron_job_name --image=busybox --restart=OnFailure --schedule="*/1 * * * * " --dry-run -o yaml > cron_job_name.yaml