<p>For pod we keep it v1
When replicaset we keep it apps/v1.</p>
<p>Question is apps/v1 contains all the objects of v1  as well or what's the hierarchy? Can someone please explain ?</p>

<p>The apiVersion is composed of two components: the<code>group</code> and the <code>version</code>.</p>
<p>The <code>version</code> indicates the levels of stability and support: if version contains <code>alpha</code>, the software may contains bugs and the feature may be dropped in future release; if version contains <code>beta</code>, the feature is considered tested, and is enabled by default - the feature will not be dropped but some details may change.</p>
<p>The <code>group</code> have been introduced to ease development and maintenance of k8s. The API group is also specified in REST path when accessing the k8s API. The full list of groups is located: <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#-strong-api-groups-strong-" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#-strong-api-groups-strong-</a></p>
<p>So there is no hierarchy between v1 and apps/v1.</p>
<p>The first API resources introduced in Kubernetes do not have groups. So you will use the <code>apiVersion</code>: <code>v1</code>.
Later resources are linked to a group. For examples, <code>Jobs</code> and <code>CronJobs</code> are both in the group <code>batch</code>. So their <code>apiVersion</code> will be <code>batch/v1</code>. <code>Deployments</code> and <code>replicasets</code> are in the <code>apps</code> group, and are using <code>apiVersion</code>: <code>apps/v1</code>.</p>
<p>You can obtain all api-resources using the command : <code>kubectl api-resources</code></p>
<p>See also: <a href="https://kubernetes.io/docs/reference/using-api/#api-groups" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/using-api/#api-groups</a></p>
