Assume that the configmap is listed as follows:
apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
namespace: ${namespace}
data:
my-config.yaml: |-
keyA:
keyB: a-value
How can I get the value of keyB
(which is a-value
) from the configmap using the kubectl
command?
PS: I was thinking of using -o jsonpath
or -o 'go-template=...
options, but I couldn't figure out the correct syntax.