liveBook · Manning

Kubernetes api server

As explained in Kubernetes in Action, Second Edition

The Kubernetes API Server is the control-plane component that validates API requests, persists Kubernetes objects, and notifies interested components of changes.

The Kubernetes API Server is the control-plane component through which people and other Kubernetes components create and change cluster objects. It exposes a RESTful API. The API Server does not run applications; worker nodes do. section 1.2.3

To deploy an application, you can describe its objects in YAML or JSON files and submit them with kubectl. Kubectl sends HTTP requests to the API Server, which validates the objects, stores them in etcd, and notifies interested components of the changes. The API Server itself is stateless; etcd holds the objects. section 1.2.4 section 1.2.3

Create a Deployment

Run `kubectl create deployment kiada --image=luksa/kiada:0.1`. Kubectl sends a request that creates a Deployment object through the API Server. A controller then creates a Pod, the scheduler assigns it to a worker node, and that node’s Kubelet starts the container. section 3.3.1

$ kubectl create deployment kiada --image=luksa/kiada:0.1
deployment.apps/kiada created

The command and its confirmation show the user-facing start of this process: creating an API object, rather than directly starting a container. section 3.3.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains validation, persistence, notification, and the deployment sequence, but does not examine API Server internals.
Examples
Uses YAML or JSON manifests and a kubectl Deployment command to trace an API request into a running container.
What it assumes
Introduces kubectl, YAML, and JSON while assuming a cluster is available for interaction.
What you can do after
Apply it via kubectl to create an object and understand why other components act afterward.
How it connects
Connects the API Server to etcd, kubectl, controllers, the scheduler, and Kubelets.

Also explained in

Compare how 4 books explain kubernetes api server →

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.