How to Create a Deployment

Create a brand new Kubernetes Deployment using a YAML file.

You can skip the usage of a YAML file and alternatively, use the kubectl run command, but you shouldn’t. The right way is the declarative way.

The following YAML snippet is the Deployment manifest file that you’ll use. The examples assume you’ve got a copy in your system’s PATH and is called deploy.yml.

Get hands-on with 1200+ tech skills courses.