liveBook · Manning

Kubernetes

As explained in Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more

Kubernetes is an open-source platform for orchestrating containerized workloads across clusters of machines.

Kubernetes is an open-source container orchestrator: it automates deployment, scaling, and management of containerized applications across multiple machines. Unlike Podman, which primarily runs applications on a single node, Kubernetes coordinates clusters of containerized microservices. section 1.1 section 8.0

Kubernetes occupies a distinct role in the container stack:

  • Orchestrates containers across multiple nodes and communicates with container engines. section 1.1
  • Uses CRI-O or containerd as purpose-built container-engine backends; Docker is being discouraged as the Kubernetes backend. section 1.1 section 8.0
  • Provides the coordination Podman lacks when applications require multiple instances, nodes, databases, and connected microservices. section 8.0

Running Podman inside a Kubernetes pod

CI/CD workloads can run Podman inside Kubernetes, but the pod must provide suitable privileges or Linux capabilities and more than one UID. Rootful execution uses a privileged container; rootless execution adds SETUID and SETGID and specifies runAsUser: 1000. section 8.4.2

Figure 1.1 Different open source projects dealing with containers within the categories of orchestrators, engines, and runtimes.

Use the container-stack diagram to distinguish Kubernetes as an orchestrator from container engines and OCI runtimes. section 1.1

apiVersion: v1
kind: Pod
metadata:
  name: podman-rootless
spec:
  containers:
  - name: rootless
    image: quay.io/podman/stable
    args:
      - podman 
      - version
    securityContext:
      capabilities:
        add:
          - "SETUID"
          - "SETGID"
      runAsUser: 1000

Inspect the rootless pod specification to see how Kubernetes expresses Podman capabilities and an explicit numeric user ID. section 8.4.2

How Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more covers it

How deep it goes
Defines orchestrators, engines, and runtimes, then demonstrates YAML-based workloads and nested Podman security requirements without detailing Kubernetes internals.
Examples
Uses Kubernetes YAML for privileged and rootless Podman pods, including securityContext, capabilities, and runAsUser.
What it assumes
Assumes familiarity with containers and pods while defining the distinctions among orchestrators, engines, and runtimes.
What you can do after
Operate/configure container workloads across nodes and run Podman within Kubernetes when required security settings are available.
How it connects
Connects container orchestration with pods, microservices, Podman, Docker, CRI-O, containerd, Linux capabilities, and user namespaces.

Also explained in

Compare how 22 books explain Kubernetes →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more. The section links point to the parts of the book it draws on.