0

I went to get a value in yaml. so I use a kubeclt ~~ -o jsonpath=~~~ if key have '.' what should command make?

ex) apiVersion: v1 items:

  • apiVersion: v1 kind: ResourceQuota metadata: name: namespace: spec: hard: hdd-ceph-block.storageclass.storage.k8s.io/requests.storage: 10Gi hdd-ceph-fs.storageclass.storage.k8s.io/requests.storage: 10Gi

Can I get a value , key is 'hdd-ceph-fs.storageclass.storage.k8s.io/requests.storage' ???

1 Answers1

1

I finally tried it out!

kubectl get secret something -o jsonpath={.data.hello\\.world}
jack zhang
  • 11
  • 1