How to Create a Deployment
Learn how we can create a Kubernetes Deployment using a YAML file.
We'll cover the following...
We'll cover the following...
Declaratively create a Deployment
To create a Deployment, we’ll use the deploy.yml file shown in the following snippet. It defines a single-container Pod wrapped in a Deployment. It’s annotated and snipped to draw attention to the parts we’ll focus on.
There’s a lot going on in the file, so let’s explain the most important bits.
The first two lines, i.e., line 1 and line 2, tell Kubernetes to create a Deployment object based on the version of the Deployment resource defined in the apps/v1 API.