<p>In the kubernetes go client, what is a <code>clientset</code>?</p>

<p>It is defined in multiple places. </p>

<ol>
<li><p>In the <code>client-go</code> package. <a href="https://github.com/kubernetes/client-go/blob/62b2cb756b8cea8fba00764ff123993eb44dbd48/kubernetes/clientset.go#L120" rel="noreferrer">https://github.com/kubernetes/client-go/blob/62b2cb756b8cea8fba00764ff123993eb44dbd48/kubernetes/clientset.go#L120</a></p></li>
<li><p>In the <code>kubernetes</code> package <a href="https://github.com/kubernetes/kubernetes/blob/80e344644e2b6222296f2f03551a8d0273c7cbce/pkg/client/clientset_generated/internalclientset/clientset.go#L64" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/80e344644e2b6222296f2f03551a8d0273c7cbce/pkg/client/clientset_generated/internalclientset/clientset.go#L64</a></p></li>
</ol>

<p>The documentation says the same thing for both of them:</p>

<blockquote>
  <p>Clientset contains the clients for groups. Each group has exactly
  one version included in a Clientset.</p>
</blockquote>

<p>This is confusing. What is a group?</p>

<p>Every resource type in Kubernetes (Pods, Deployments, Services and so on) is a member of an <a href="https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups" rel="noreferrer">API group</a>. These logically "group" the different types. Some examples of groups are</p>

<ul>
<li><code>core</code></li>
<li><code>extensions</code></li>
<li><code>batch</code></li>
<li><code>apps</code></li>
<li><code>authentication</code></li>
<li><code>autoscaling</code></li>
</ul>

<p><a href="https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-versioning" rel="noreferrer">Groups also contain versions</a>. Versions allow developers to introduce breaking changes to APIs, and manage them as they do. Some examples of versions inside a group</p>

<ul>
<li><code>core/v1</code></li>
<li><code>extensions/v1beta</code></li>
<li><code>apps/v1beta1</code></li>
<li><code>batch/v1</code>, <code>batch/v2alpha1</code> (notice the two versions inside the same group)</li>
<li><code>authentication/v1</code>, <code>authentication/v1beta1</code></li>
<li><code>autoscaling/v1</code>, <code>autoscaling/v2alpha1</code></li>
</ul>

<p>So the client documentation is saying that it's creating a different client for every group.</p>
