Kubernetes ConfigMap Values

December 29, 2024 note-to-self k8s

Extract a Specific Key from a ConfigMap: You can use jq or yq to parse JSON or YAML output to get specific values. For example, to get the value of a specific key in a ConfigMap:

kubectl get configmap <configmap-name> -n <namespace> -o jsonpath=‘{.data.<key-name>}’

Replace <key-name> with the name of the key you want to query.


As always: This is for my own understanding. It might be wrong but reflects my current understanding.

These posts are for my own understanding. Reader beware. Info may be wrong but it reflects my current understanding.