<p>I seem to find it hard to quickly lookup something in k8s docs or api reference. Terraform docs are very clear to understand.</p>
<p>How do one find what's the child element for parent?  For example, for PV Claim <code>resources</code> needs a child <code>requests</code> but its not described anywhere except in example in this <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">link</a>, but there aren't examples for everything.</p>
<p>Either I'm looking at the wrong docs or I'm not doing proper research. I wonder what's the proper way or what I should know before checking the docs.</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: myclaim
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 8Gi
</code></pre>

user630702
<blockquote>
<p>I seem to find it hard to quickly lookup something in k8s docs or api reference. Terraform docs are very clear to understand.</p>
</blockquote>
<p>The fastest and easiest way to quickly get documentation about Kubernetes resources is to use <code>kubectl explain &lt;resource&gt;</code> e.g:</p>
<pre><code>kubectl explain PersistentVolumeClaim.spec.resources
</code></pre>
<p>In this case with output like:</p>
<pre><code>KIND:     PersistentVolumeClaim
VERSION:  v1

RESOURCE: resources &lt;Object&gt;

DESCRIPTION:
     Resources represents the minimum resources the volume should have. More
     info:
     https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

     ResourceRequirements describes the compute resource requirements.

FIELDS:
   limits   &lt;map[string]string&gt;
     Limits describes the maximum amount of compute resources allowed. More
     info:
     https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

   requests &lt;map[string]string&gt;
     Requests describes the minimum amount of compute resources required. If
     Requests is omitted for a container, it defaults to Limits if that is
     explicitly specified, otherwise to an implementation-defined value. More
     info:
     https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
</code></pre>
<p>Then you get a good description of available fields. But as you say, it is not very clear what fields is needed in this case.</p>
