...

/

Defining Our Deployment Manifest

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/v1
kind: Deployment
metadata:
name: hellok8s
spec:
replicas: 1
selector:
matchLabels:
app: hellok8s
template:
metadata:
labels:
app: hellok8s
spec:
containers:
- image: brianstorti/hellok8s:v1
name: 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.