What is kind in kubernetes YAML meant?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
In Kubernetes YAML, kind tells Kubernetes what type of object the manifest describes. It answers the question "what am I creating or updating" before Kubernetes even looks at the object-specific fields under spec.
kind does not work alone. Kubernetes interprets it together with apiVersion. The pair tells the API server which schema and behavior to use.
kind and apiVersion Work Together
Here is a simple Deployment manifest:
In this example:
- '
apiVersion: apps/v1selects the Deployment API group and version.' - '
kind: Deploymentsays the object is a Deployment.' - Kubernetes then validates the remaining fields against the Deployment schema.
If you change kind to Service, the expected spec changes completely.
Examples of Common kind Values
Different resource types use different kinds:
Common values include Pod, Deployment, Service, ConfigMap, Secret, Job, and Ingress. Each one maps to a different Kubernetes resource type with its own rules.
Why kind Matters
Kubernetes is a large API, not a single object type. kind is how the system knows whether your YAML describes a workload, a network endpoint, configuration data, or something else entirely.
This also affects how controllers behave:
- A
Deploymentis reconciled by the Deployment controller. - A
Jobis handled by the Job controller. - A
Servicecreates a stable virtual endpoint for matching pods.
So kind is not just a label. It determines the behavior attached to the object.
Custom Resources Also Use kind
The concept is not limited to built-in resources. Custom Resource Definitions add new kinds to the cluster.
In that case, kind: BackupPolicy only works if the cluster already knows that custom resource definition.
This is one reason manifests are portable only within the set of APIs a cluster actually exposes. A valid custom kind in one cluster may be completely unknown in another.
Multi-Object Files
A single YAML file can contain multiple documents separated by ---. Each document still needs its own apiVersion, kind, and metadata.
Kubernetes reads each document independently.
Common Pitfalls
One common mistake is using the wrong apiVersion for a given kind. A manifest may look valid but still fail because that kind is not served in the selected API version.
Another issue is case sensitivity. Deployment and deployment are not the same. Kubernetes expects the exact kind name.
People also confuse the kind field in normal manifests with the separate local tool named kind, which is a Kubernetes-in-Docker project. They are unrelated except for the word.
Finally, changing kind without rewriting spec almost always breaks the manifest, because each resource type expects different fields.
When debugging, kubectl explain deployment or kubectl explain service is often the fastest way to see what a given kind expects in its schema.
Summary
- '
kindtells Kubernetes what type of object the YAML describes.' - Kubernetes interprets
kindtogether withapiVersion. - Different kinds have different schemas, controllers, and runtime behavior.
- Custom resources introduce additional valid kind values.
- Every YAML document needs its own
kind, even when several resources live in one file.

