<p>Most Kubernetes objects can be created with <code>kubectl create</code>, but if you need e.g. a <code>DaemonSet</code> — you're out of luck.</p>

<p>On top of that, the objects being created through <code>kubectl</code> can only be customized minimally (e.g. <code>kubectl create deployment</code> allows you to only specify the image to run and nothing else).</p>

<p>So, considering that Kubernetes actually expects you to either edit a minimally configured object with <code>kubectl edit</code> to suit your needs or write a spec from scratch and then use <code>kubectl apply</code> to apply it, how does one figure out all possible keywords and their meanings to properly describe the object they need?</p>

<p>I expected to find something similar to <a href="https://docs.docker.com/compose/compose-file/" rel="nofollow noreferrer">Docker Compose file reference</a>, but when looking at <a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/" rel="nofollow noreferrer">DaemonSet docs</a>, I found only a single example spec that doesn't even explain most of it's keys.</p>

Nikolay Edigaryev
<p>The spec of the resources in <code>.yaml</code> file that you can run <code>kubectl apply -f</code> on is described in <a href="https://kubernetes.io/docs/reference/kubernetes-api/" rel="nofollow noreferrer">Kubernetes API reference</a>.</p>
<p>Considering DaemonSet, its <code>spec</code> is described <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/" rel="nofollow noreferrer">here</a>. It's <code>template</code> is actually the same as in Pod resource.</p>
