In the kubernetes go client, what is a clientset?
It is defined in multiple places.
In the client-go package. https://github.com/kubernetes/client-go/blob/62b2cb756b8cea8fba00764ff123993eb44dbd48/kubernetes/clientset.go#L120
In the kubernetes package https://github.com/kubernetes/kubernetes/blob/80e344644e2b6222296f2f03551a8d0273c7cbce/pkg/client/clientset_generated/internalclientset/clientset.go#L64
The documentation says the same thing for both of them:
Clientset contains the clients for groups. Each group has exactly one version included in a Clientset.
This is confusing. What is a group?
Every resource type in Kubernetes (Pods, Deployments, Services and so on) is a member of an API group. These logically "group" the different types. Some examples of groups are
coreextensionsbatchappsauthenticationautoscalingGroups also contain versions. Versions allow developers to introduce breaking changes to APIs, and manage them as they do. Some examples of versions inside a group
core/v1extensions/v1betaapps/v1beta1batch/v1, batch/v2alpha1 (notice the two versions inside the same group)authentication/v1, authentication/v1beta1autoscaling/v1, autoscaling/v2alpha1So the client documentation is saying that it's creating a different client for every group.