Reputation: 139
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
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
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