Defining Our Deployment Manifest
Learn how to define our own manifest for deployment.
We'll cover the following...
Deployment Manifest
Just like we defined a manifest for our nginx
pod, we need to define a manifest for a deployment, and they actually look fairly similar:
Press + to interact
apiVersion: apps/v1kind: Deploymentmetadata:name: hellok8sspec:replicas: 1selector:matchLabels:app: hellok8stemplate:metadata:labels:app: hellok8sspec:containers:- image: brianstorti/hellok8s:v1name: hellok8s-container
Let’s go through all the fields in this manifest to understand what’s happening. First, we tell Kubernetes what kind of object we are defining here. In our case, this is a Deployment.
In the metadata.name
field, we define a unique name for our deployment. This can be anything that helps you identify what this deployment is managing.
In the spec
section, we define what this deployment will do. First, we define how ...
Access this course and 1400+ top-rated courses and projects.