Category: Kubernetes, yaml

In this post, you will learn about the basic imperative commands that kubernetes offers, which will allow you to create and deploy objects more efficiently and stand out as a DevOps Engineer. When working with kubernetes, you will mostly be creating objects in a declarative way using YAML definition files.

o yaml : This will output the resource definition in YAML format on the screen.

Create an NGINX Pod: Generate a POD manifest YAML file: As a reminder, the -o yaml parameter tells kubectl to output a yaml file, while — dry-run instructs kubernetes to NOT create the POD.

To create a deployment from the command line: Generate a deployment YAML file template: kubectl create deployment does not have a — replicas option.

Related Articles