Kubernetes Manifest File
A Kubernetes manifest file is, as defined on Glossary of Kubernetes’ official documentation,
Specification of a Kubernetes API object in JSON or YAML format.
A manifest specifies the desired state of an object that Kubernetes will maintain when you apply the manifest. For YAML format, each file can contain multiple manifests.
Podman uses Kubernetes manifest files as a way to describe pods. This Kubernetes manifests files can be used for efficient development and deployment experience.
Podman supported the following Kubernetes kinds:
Workflow
Given a Kubernetes manifest file that describes a pod, the pod can be created by Podman by running
podman kube play file.yml
Note
We will name the Kubernetes manifest file used by Podman as play.yml in the rest of this tutorial.
Example
Given the following Kubernetes manifest file
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-5.3.1
apiVersion: v1
kind: Pod
metadata:
labels:
app: nginx0
name: nginx0
spec:
containers:
- args:
- nginx
- -g
- daemon off;
image: docker.io/library/nginx:alpine
name: nginx
running
podman kube play play.yml
creates a pod named nginx0 with a container named nginx running the image docker.io/library/nginx:alpine.