Skip to Content
Programming Kubernetes
book

Programming Kubernetes

by Michael Hausenblas, Stefan Schimanski
July 2019
Intermediate to advanced
270 pages
6h 41m
English
O'Reilly Media, Inc.
Book available
Content preview from Programming Kubernetes

Chapter 2. Kubernetes API Basics

In this chapter we walk you through the Kubernetes API basics. This includes a deep dive into the API server’s inner workings, the API itself, and how you can interact with the API from the command line. We will introduce you to Kubernetes API concepts such as resources and kinds, as well as grouping and versioning.

The API Server

Kubernetes is made up of a bunch of nodes (machines in the cluster) with different roles, as shown in Figure 2-1: the control plane on the master node(s) consists of the API server, controller manager, and scheduler. The API server is the central management entity and the only component that talks directly with the distributed storage component etcd.

The API server has the following core responsibilities:

  • To serve the Kubernetes API. This API is used cluster-internally by the master components, the worker nodes, and your Kubernetes-native apps, as well as externally by clients such as kubectl.

  • To proxy cluster components, such as the Kubernetes dashboard, or to stream logs, service ports, or serve kubectl exec sessions.

Serving the API means:

  • Reading state: getting single objects, listing them, and streaming changes

  • Manipulating state: creating, updating, and deleting objects

State is persisted via etcd.

Kubernetes architecture overview
Figure 2-1. Kubernetes architecture overview

The heart of Kubernetes is its API server. But how does ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower

Publisher Resources

ISBN: 9781492047094Errata PageSupplemental Content