liveBook · Manning

Kind field

As explained in Kubernetes in Action, Second Edition

An object kind is the Kubernetes API identifier that specifies the type of an API object.

The kind field identifies the type of Kubernetes API object described by a manifest. Together with apiVersion, it tells Kubernetes which object type and versioned schema the manifest uses. Common kinds include Node, Pod, Service, and Deployment. section 4.2.1

A Pod manifest

In this manifest, kind: Pod declares a Pod object. The surrounding fields then describe its name and desired contents: one container named kiada, using the luksa/kiada:0.1 image and listening on port 8080. section 5.2.1

Listing 5.1 A basic pod manifest file
apiVersion: v1      #1
kind: Pod      #2
metadata:     
  name: kiada     #3
spec: 
  containers:
  - name: kiada      #4
    image: luksa/kiada:0.1     #5
    ports: 
    - containerPort: 8080      #6

Inspect the complete minimal Pod manifest and see where kind appears alongside apiVersion, metadata, and spec. section 5.2.1

Use kubectl explain with a kind to inspect its available fields. For example, kubectl explain nodes shows the Node description and top-level fields; kubectl explain node.spec drills into the specification, while --recursive lists the full field structure. Specify --api-version when examining another version of the same kind. section 4.2.2

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines kind and relates it to apiVersion, then stops short of describing object-specific schemas in detail.
Examples
Uses Node, Pod, Deployment, and Service kinds, including a basic Pod manifest and kubectl explain nodes output.
What it assumes
Assumes basic YAML familiarity while introducing Kubernetes API objects, kinds, and versioned schemas.
What you can do after
Apply it via YAML manifests and inspect kind-specific fields with kubectl explain.
How it connects
Connects kind with apiVersion, YAML manifests, API objects, metadata, and kubectl explain.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.