liveBook · Manning

Kubernetes resource

As explained in Platform Engineering on Kubernetes

A Kubernetes resource is an API object that declares the desired configuration or state of a workload, service, or cluster capability.

A Kubernetes resource is a declarative YAML object that configures how containerized services run, communicate, and receive traffic in a cluster. Developers inspect and apply resources with kubectl while investigating a running application. section 2.0 section 2.1.2

Common resource kinds divide deployment, networking, and configuration responsibilities:

  • Deployments declare the required number of container replicas and configure the containers, including environment variables. section 2.1.2
  • Services route traffic to deployment containers, balance requests across replicas, and provide service discovery through stable service names. section 2.1.2
  • Ingresses route traffic from outside the cluster to selected services. section 2.1.2
  • ConfigMaps and Secrets store configuration for service instances; Secrets protect sensitive information. section 2.1.2

Conference application

Package each Conference application service as a container image, define its Kubernetes resources in YAML, install the services with Helm, and inspect the resulting resources with kubectl in a local KinD cluster. section 2.0 section 2.1.2

Figure 2.2 Templating engines render YAML resources by replacing variables.

Templating engines render Kubernetes YAML resources by replacing variables, helping manage configurations that would otherwise become difficult to maintain. section 2.1.2

Resources are composable but become cumbersome at application scale. Release strategies such as canary, blue/green, and A/B deployments may require coordinated changes across deployments, services, and ingress rules, making manual application error-prone. section 8.1.4

How Platform Engineering on Kubernetes covers it

How deep it goes
Defines common resource responsibilities and operational drawbacks but defers detailed resource reference material.
Examples
Uses a Conference application, container images, YAML definitions, a KinD cluster, Helm installation, and kubectl inspection.
What it assumes
Assumes containerized services and a Kubernetes cluster, while introducing resource kinds through a running application.
What you can do after
Operate/configure services by defining YAML resources, installing them with Helm, and inspecting them with kubectl.
How it connects
Connects deployments, services, ingress, ConfigMaps, Secrets, Helm, kubectl, GitOps, and release strategies.

Also explained in

Compare how 5 books explain Kubernetes resource →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.