4 Introducing the Kubernetes API objects

 

This chapter covers

  • Managing a Kubernetes cluster and the applications it hosts via its API
  • Understanding the structure of Kubernetes API objects
  • Retrieving and understanding an object’s YAML or JSON manifest
  • Inspecting the status of cluster nodes via Node objects
  • Inspecting cluster events through Event objects

The previous chapter introduced three fundamental objects that make up a deployed application. You created a Deployment object that spawned multiple Pod objects representing individual instances of your application and exposed them to the world by creating a Service object that deployed a load balancer in front of them.

The chapters in the second part of this book explain these and other object types in detail. In this chapter, the common features of Kubernetes objects are presented using the example of Node and Event objects.

4.1       Getting familiar with the Kubernetes API

In a Kubernetes cluster, both users and Kubernetes components interact with the cluster by manipulating objects through the Kubernetes API, as shown in figure 4.1.

These objects represent the configuration of the entire cluster. They include the applications running in the cluster, their configuration, the load balancers through which they are exposed within the cluster or externally, the underlying servers and the storage used by these applications, the security privileges of users and applications, and many other details of the infrastructure.

4.1.1   Introducing the API

 
 
 

4.1.2   Understanding the structure of an object manifest

 
 

4.2       Examining an object’s individual properties

 
 
 

4.2.1   Exploring the full manifest of a Node object

 
 
 
 

4.2.2   Understanding individual object fields

 

4.2.3   Understanding an object’s status conditions

 
 

4.2.4   Inspecting objects using the kubectl describe command

 
 
 

4.3       Observing cluster events via Event objects

 
 

4.3.1   Introducing the Event object

 
 
 

4.3.2   Examining the YAML of the Event object

 
 
 

4.4       Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest