8 Working with Kubernetes

 

This chapter covers

  • Creating Kubernetes YAML files from existing Podman pods and containers
  • Creating Podman containers and pods from a Kubernetes YAML file
  • Shutting down and removing pods and containers using the Kubernetes YAML file
  • Building container images on the fly before launching pods and containers from a Kubernetes YAML file
  • Running Podman inside of a Podman and Kubernetes container

Some readers come to this chapter expecting to see how Podman can be used as the container engine for Kubernetes, similar to how it has used Docker in the past. While there have been some efforts to use Podman as the container engine for Podman (the kind project supports this), I do not generally recommend that you use Podman for this purpose. I recommend you use CRI-O described in appendix A, since it was built specifically to work with Kubernetes and shares the underlying libraries of Podman. Kubernetes is now discouraging users from using the Docker backend and encouraging them to use a CRI-O or containerd as a backend.

8.1 Kubernetes YAML files

8.2 Generating Kubernetes YAML files with Podman

8.3 Generating Podman pods and containers from Kubernetes YAML

8.3.1 Shutting down pods and containers based on a Kubernetes YAML file

8.3.2 Building images using Podman and Kubernetes YAML files

8.4 Running Podman within a container

8.4.1 Running Podman within a Podman container

8.4.2 Running Podman within a Kubernetes pod

Summary