Profile picture of Liam Moat

Liam Moat

Principal Software Engineer at Microsoft

Kubernetes

Page 1 of 1. See all tags.

Using kubectl to generate Kubernetes YAML

By Liam Moat.

When you get started with Kubernetes, the first thing you will probably do is create a Deployment using the kubectl command-line interface. When you create an object in Kubernetes, including a Deployment, you must provide the object spec that describes its desired state, as well as some basic information about the object (such as a name). Most often, you provide this information using a YAML file. This post will explore how to use kubectl, and commands that you may already be familiar with, to generate this YAML.