<#CHMV3P9NV|certified-kub-admin> can you please let me know if we can use --reco . . .

ekko sheko:
<#CHMV3P9NV|certified-kub-admin> can you please let me know if we can use --record command any where within the kubernetes command like while creating the PV or PVC , can we use the record , and can record be used only with imeprative command can’t be specify withing the pod definition file.

Tej_Singh_Rana:
Hello, @ekko sheko
I don’t think so we can use record field in the pod definition file but you can add similar label in the metadata’s annotations field with your description to identify the cause of changes.
https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/|Annotations

ekko sheko:
ok thanks @Tej_Singh_Rana but what if i need to record the changes done in the PVC , should we convert that to yaml file first and then again create the pvc with --record flag

Tej_Singh_Rana:
Did you try with kubectl edit pvc &lt;pvc-name&gt; --record?

ekko sheko:
But i think that this will not work as POD will already be using that PVC and we can’t delete the PVC so how the changes for PVC can be recorded?

ekko sheko:
no let me try on this i am not sure i will let you know thanks for the suggestions

ekko sheko:
Also this query is different from above question , can you please let me know while taking the etcd backup in a cluster , do we need to login to Master node via ssh or how can be access to etcd server , ssh to etcd ip? can you please guide…

Tej_Singh_Rana:
You’ve to check first, where is etcd cluster deployed.

Tej_Singh_Rana:
> do we need to login to Master node via ssh or how can be access to etcd server , ssh to etcd ip?
Regarding this query, information available in the question.

Tej_Singh_Rana:
If the question says, you have to ssh to master node and take backup or restore then you have to do ssh to that node.

ekko sheko:
You’ve to check first, where is etcd cluster deployed.
and how we can check this…

Tej_Singh_Rana:
> ssh to etcd ip?
I don’t think this could happen in the exam or KK labs.

Tej_Singh_Rana:
> You’ve to check first, where is etcd cluster deployed.
> and how we can check this…
If deployed as container:

$ sudo docker ps 

If deployed as service:

$ sudo systemctl status etcd

It’s a common command, I hope you know.

ekko sheko:
in this case etcd is deployed on master node correct , so we need to access the master node to take back up ?
image.png

Tej_Singh_Rana:
Even you can check via

$ kubectl get pods -n kube-system

Tej_Singh_Rana:
> in this case etcd is deployed on master node correct , so we need to access the master node to take back up ?
Only In case, if question says.

Tej_Singh_Rana:
I think you will get other parameters also in the question. So to do ssh to master node doesn’t make sense.

Kanchan:
How are u able to edit the pvc attached to pod?

Kubs:
you can used kubectl patch command to edit the pvc