By Andrew Chen and Dominik Tornow

Kubernetes is a Container Orchestration Engine designed to host containerized applications on a set of nodes, commonly referred to as a cluster. Using a systems modeling approach, this series aims to advance the understanding of Kubernetes and its underlying concepts.

This blog post uses the Alloy Specification Language, a specification language for expressing structure and behavior based on first order logic. However a plain English description of each Alloy specification is provided.

This blog post is the first in a three part series:

Part I describes the structure and behavior of the API Server

Part II describes the Kubernetes API

Part III describes the Kubernetes Object Store

Preface — The Term “API Server”

The term “API Server” is heavily overloaded and refers to multiple concepts. This blog post will use the terms API Server, Kubernetes API, and Kubernetes Object Store to denote individual concepts.

Figure 1. API Server, Kubernetes API, and Kubernetes Object Store

“Kubernetes API” denotes the component that processes read and write requests and queries or modifies the Kubernetes Object Store accordingly.

“Kubernetes Object Store” denotes the persistent set of Kubernetes Objects.

“API Server” denotes the union of the Kubernetes API and the Kubernetes Object Store.

The API Server

The Kubernetes API Server is a core component of Kubernetes. Conceptually, the Kubernetes API Server is the database of Kubernetes, representing the state of the cluster as a set of Kubernetes Objects. Examples of Kubernetes Objects are Pod Objects, ReplicaSet Objects, and Deployment Objects.

Figure 2. The Kubernetes API Server & Kubernetes Objects

The Kubernetes API Server exists in multiple revisions. A revision is a snapshot in time allowing arbitrary time travel, similar to a git repository:

The Kubernetes API Server has a .rev property, short for Kubernetes API Server revision. The .rev property indicates the snapshot in time.

The Kubernetes Objects has a .mod property, short for Kubernetes Object revision. The .mod property indicates the snapshot in time the object was last modified.

However, in practice, the implementation of the Kubernetes API Server limits time travel and discards snapshots after 5min by default.