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.

Most posts are for my own reference and reflection, and shouldn’t be taken as fully accurate or instructional.