Hello
kubectl can be used to get the yaml related to pretty much any object.
The option is "-o yaml".
So try adding this to your kubectl get command...
kubectl get configmap -o yaml
Although I would recommend selecting the specific configmap you are interested in, rather than getting all of them.
Assuming your namespace is 'devel' and the configmap is called apiKeys, your command would be...
kubectl get configmap apiKeys -n devel -o yaml
I don't have a cluster up at the moment, so I couldn't check that syntax, but I think it is right.
Regards,
------------------------------
Neil Casey
Senior Consultant
Syntegrity Solutions
Melbourne, Victoria
IBM Champion (Cloud) 2019-21
+61 (0) 414 615 334
------------------------------
Original Message:
Sent: Tue April 13, 2021 04:18 AM
From: JanakiramSudhakar Kota
Subject: Unable to modify the config file.
Hello Parveen Kumar,
Thank you for the response.
when i am issued the below command i got couple of details but i am not which config map contains this spec.databaseBackup.credentials
kubectl get configmap
I couldn't able to list the corresponding yaml file. Can you please help to let me know how to get the corresponding file.
Thanks,
Janakiram.
------------------------------
JanakiramSudhakarKota
------------------------------
Original Message:
Sent: Mon April 12, 2021 07:49 AM
From: Parveen Kumar
Subject: Unable to modify the config file.
What commands have you tried when you say you are unable to modify the config file?
What do you see when you describe or get your deployment config (using kubectl)? If spec.databaseBackup is not required (seems so as you mentioned you have created an empty config file for backup), then you can kubectl edit your deployment and remove spec.databaseBackup.
You have not provided enough information on how you added this empty config and how this ended up against "spec.databaseBackup.credentials". Was the empty config file added to a directory and a ConfigMap was created from this directory? You can edit ConfigMap and put in the required values in the relevant ConfigMap using kubectl edit command.
------------------------------
Parveen Kumar