The Imperative Way
Let's look at the imperative way to deploy Deployments.
We'll cover the following
Warning! The imperative way is not the Kubernetes way. It introduces the risk that you make imperative changes and never update your declarative manifests, rendering the manifests incorrect and out-of-date. This introduces the risk that stale manifests are subsequently used to update the cluster at a later date, unintentionally overwriting important changes that were made imperatively.
Use kubectl
to declaratively deploy the following Deployment (later steps will be done imperatively).
The YAML file is called deploy.yml
.
Get hands-on with 1200+ tech skills courses.