Search⌘ K

Pod Manifest Files

Explore the essential elements of Kubernetes Pod manifest files in this lesson. Learn to identify and configure fields like kind, apiVersion, metadata, and spec to correctly define single and multi-container Pods. Gain practical knowledge to deploy and manage Pods effectively.

We'll cover the following...

Introduction to Pod manifest files

Let’s see our first Pod manifest. This is the pod.yml file from the pods folder.

YAML
kind: Pod
apiVersion: v1
metadata:
name: hello-pod
labels:
zone: prod
version: v1
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
ports:
- containerPort: 8080
resources:
limits:
memory: 128Mi
cpu: 0.5

It’s a simple example, but straight away, we can see four top-level fields: kind, ...