A Kubernetes manifest is a declarative YAML document that tells Kubernetes how to deploy and operate an application workload. A deployment manifest names the deployment, selects the container image, and specifies how many instances should run. section 18.3.1
apiVersion: apps/v1
kind: Deployment
metadata:
name: taco-cloud-deploy
labels:
app: taco-cloud
spec:
replicas: 3
selector:
matchLabels:
app: taco-cloud
template:
metadata:
labels:
app: taco-cloud
spec:
containers:
- name: taco-cloud-container
image: tacocloud/tacocloud:latest
The manifest defines a Deployment with three replicas, matching labels, and a container based on the Taco Cloud image. section 18.3.1
A practical manifest can also connect deployment to application health:
- Set replicas to 3 so Kubernetes maintains three running container instances and replaces one when it fails. section 18.3.1
- Configure liveness and readiness probes to query Spring Boot Actuator endpoints on port 8080 every five seconds after an initial delay. section 18.3.3
- Use readiness to prevent traffic from reaching an unavailable application, and liveness to let Kubernetes replace a failed pod. section 18.3.3
Apply and inspect a deployment
Save the manifest as deploy.yaml, apply it with kubectl apply -f deploy.yaml, and inspect the resulting pods and deployment with kubectl get all. For local access, forward a pod's port with kubectl port-forward. section 18.3.1









