I'm trying to save the contents of a configmap to a file on my local hard drive. Kubectl supports selecting with JSONPath but I can't find the expression I need to select just the file contents.
The configmap was created using the command
kubectl create configmap my-configmap --from-file=my.configmap.json=my.file.json
When I run
kubectl describe configmap my-configmap
I see the following output:
Name:         my-configmap 
Namespace:    default 
Labels:       <none> 
Annotations:  <none>
Data
==== 
my.file.json:
---- 
{
    "key": "value" 
} 
Events:  <none>
The furthest I've gotten so selecting only the file contents is this:
 kubectl get configmap my-configmap -o jsonpath="{.data}"
Which outputs
map[my.file.json:{
    "key": "value"
}]
The output that I want is
{
  "key": "value"
}
What is the last piece of the JSONPath puzzle?
 
     
    