liveBook · Manning

Chapter 4: Navigating the Kubernetes API and object model

What you will learn in chapter 4 of Kubernetes in Action, Second Edition

The chapter introduction recalls how Deployments, Pods, and Services formed the previous chapter’s application and introduces the study of common Kubernetes object features.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduction recalls how Deployments, Pods, and Services formed the previous chapter’s application and introduces the study of common Kubernetes object features.

Key terms: Deployment object, Pod objects, Service object, load balancer

4.1 Getting familiar with the Kubernetes API

The section introduces Kubernetes API objects as the way users and Kubernetes components configure a cluster.

Key terms: Kubernetes API, objects, configuration

4.1.1 Introducing the API

Introduces the Kubernetes API as a RESTful way to interact with cluster state, distinguishes API resources from objects, and explains how objects are represented in requests and responses.

Key terms: Kubernetes API, RESTful API, resources, objects, CRUD, resource, object, URI, collection, API versions

4.1.2 Understanding the structure of an object manifest

Explains the main parts of a Kubernetes object manifest, how controllers use spec and status, and why some objects lack those sections.

Key terms: type metadata, object metadata, spec, status, controller, desired state, actual state, metadata, static data, Event object

4.2 Examining an object’s individual properties

This section uses Node objects to show how Kubernetes represents cluster machines and separates their configuration from their state.

Key terms: Node object, host, spec, status, kubectl get nodes, Kubelet, node agent, registers the node

4.2.1 Exploring the full manifest of a Node object

This section uses a Node manifest to show how to inspect a Kubernetes object and interpret its main fields.

Key terms: kubectl get nodes, kubectl get node <node-name> -o yaml, -o json, kubectl proxy, apiVersion, kind, schema, API group, core API group, metadata

4.2.2 Understanding individual object fields

This section shows how to inspect Kubernetes object fields with kubectl explain and how the selected API version affects the fields shown.

Key terms: kubectl explain, kind, field, --recursive, API version, --api-version

4.2.3 Understanding an object’s status conditions

Explains how status conditions describe different aspects of a Kubernetes object’s state, using Node conditions to show how to spot problems.

Key terms: conditions, type, status, reason, message, lastTransitionTime, Ready, MemoryPressure, DiskPressure, PIDPressure

4.2.4 Inspecting objects using the kubectl describe command

This section shows how kubectl describe presents a Node object readably and adds related information gathered from other API objects.

Key terms: kubectl describe, Node object, YAML manifest, Pod objects, events, allocated compute resources

4.3 Observing cluster events via Event objects

This section explains how controller-generated events make reconciliation activity and cluster problems visible.

Key terms: controllers, reconciling, spec field, Normal, Warning, events

4.3.1 Introducing the Event object

This section explains that Kubernetes events are short-lived Event objects and shows how to list and filter them with kubectl.

Key terms: Event object, Kubernetes API, YAML manifest, etcd, kubectl describe, kubectl get events, -o wide, field selector, --field-selector, kubectl explain events

4.3.2 Examining the YAML of the Event object

This section explains why Event object YAML is harder to read than a Node manifest and how alphabetical field ordering affects Kubernetes manifests generally.

Key terms: Event object, spec, status, Node object, YAML manifest, alphabetical order

4.4 Summary

Summarizes how Kubernetes API objects are represented and managed, and how their status and events help inspect cluster components.

Where this is used later

Concepts explained in this chapter

← Chapter 3: Deploying your first application on Kubernetes Chapter 5: Running applications with pods →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.