liveBook · Manning

Idempotency

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

The property that repeating the same operation produces no further change after the first successful application.

Idempotency means that repeating the same Kubernetes API operation leaves resource state unchanged after the first successful application. This makes declarative infrastructure behavior consistent and predictable. section 1.9

Distinguish common resource commands by their repeated-call behavior:

  • create expects no existing resource and fails when one is already present. section 1.9
  • apply can create or update a resource while preserving declarative, repeatable behavior. section 1.9
  • replace deletes and recreates the resource; on a Deployment, this triggers a new rollout. section 1.9

Repeat a declarative application

Run the same kubectl apply call against a resource manifest multiple times. After the first successful application, the resource remains in the same state rather than accumulating additional changes. section 1.9

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Defines repeated-call behavior and contrasts create, apply, and replace, but stops short of API internals.
Examples
Contrasts kubectl create, apply, and replace, including replacement-triggered Deployment rollouts.
What you can do after
Operate/configure Kubernetes resources by repeating an API call while expecting stable state.
How it connects
Connects declarative syntax with Kubernetes API operations, resource manifests, Deployments, and rollouts.

Also explained in

Compare how 17 books explain idempotency →

Related concepts

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