user3839347
user3839347

Reputation: 139

Path of deployment yaml in kubernetes cluster

When we run the below command from root user in kubernetes master node:

on which path the yaml file gets stored ?

from which path it provides us the yaml body ?

Upvotes: 0

Views: 3432

Answers (2)

Richard Kostyn
Richard Kostyn

Reputation: 31

Raw k8s stores everything within etcd. When running commands like kubectl get deployment nginx -o yaml kubectl talks to the kubeapi which talks to etcd to get the yaml for you.

etcd is a key-value store so any kubectl get XYZ is reading a specific key. Any kubectl create XYZ is creating a new key/value within etcd.

Because of the importance of etcd within k8s, it is heavily recommended you back it up in production environments.

The components and how they talk to everything can be found here: https://kubernetes.io/docs/concepts/overview/components/

Upvotes: 1

Emon46
Emon46

Reputation: 1636

It's never going to create any yaml. It's create a deployment. when you run this kubectl get deployment nginx -o yaml. The deployment just showed in yaml format.

Upvotes: 0

Related Questions