API Groups and Versioning
What you'll learn: How Kubernetes organizes its vast API surface into logical groups and manages changes through versioning.
Why Groups Matter
Kubernetes exposes hundreds of resources—Pods, Deployments, Jobs, Services, and more. Instead of dumping them all into one flat namespace, Kubernetes organizes related resources into API groups. Think of it like organizing books in a library: instead of one massive shelf, you have sections for fiction, science, history, etc.
The Core Group and Named Groups
The core group (also called the "legacy group") contains fundamental resources like Pods, Services, and Namespaces. These are accessed at /api/v1 without a group name in the API path.
Named groups organize newer or specialized resources:
appsgroup: Deployments, StatefulSets, DaemonSetsbatchgroup: Jobs, CronJobsnetworking.k8s.io: NetworkPolicies, Ingressesstorage.k8s.io: StorageClasses, VolumeAttachments
Named groups appear in API paths like /apis/apps/v1 or /apis/batch/v1.
Versioning: Managing Change
Each API group has versions that indicate maturity and stability:
v1: Stable, production-ready, backward compatibility guaranteedv1beta1: Beta quality, tested but may change before going stablev1alpha1: Experimental, may change significantly or be removed
This allows Kubernetes to evolve without breaking existing workloads. You can use batch/v1 for stable Job definitions while new features are tested in batch/v1beta2.
How They Work Together
When you create a Deployment, you're actually using apiVersion: apps/v1. That tells the API server: "Look in the apps group at version v1 for the Deployment resource definition."
Key Takeaway: API groups organize Kubernetes resources into logical categories, while versioning enables stable evolution—ensuring new features can be tested without breaking production systems.