I have the following configmap where I want to retrieve the IPs using jsonpath how can that be done?
apiVersion: v1
data:
domain.yaml: |
dns:
- 127.0.0.1
- 127.0.0.2
I have tried the following which does not work: kubectl get cm domain -o jsonpath={.domain.yaml.dns[0]}
"domain.yaml": "dns: \n - 127.0.0.1\n - 127.0.0.1\n"