Chapter 1. Kubernetes Extensibility

This first chapter highlights why I think extending Kubernetes via its API is the right way to utilize all of its capabilities. It gives you an idea of how you get to include your flow “for free” as part of the Kubernetes architecture—things like authentication and authorization, for example.

This chapter demonstrates that there is much more that you can do beside writing YAML specifications to apply via the command line.

Kubernetes Is a Framework

When I think about Kubernetes, I do not see it as an end application. For example, it does not include MySQL, Jaeger, or other developer tools or databases. To me, Kubernetes provides solid primitives that I can integrate into my application, such as the following:

kubectl run nginx --image=nginx --port=80

This is the first command everyone runs when they are learning Kubernetes for the first time. This action creates a new pod with an NGINX container image that exposes port 80.

But what happens behind the scenes? Figure 1-1 illustrates this from a very high perspective. kubectl is a very powerful and flexible client for interacting with Kubernetes. Because it is complex, it cannot have just one piece of code. As you can see, there are many blocks. These are just the most important ones for this example, but even so, there are many of them.

A simplified Kubernetes architecture  with its more important services
Figure 1-1. A simplified Kubernetes architecture, with its ...

Get Extending Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.