I am using kubectl jsonpath query to display below output:
kubectl get pvc -o=jsonpath='{range .items[*]}{@.metadata.name}{" "}{@.spec.resources.requests.storage}{" "}{@.spec.storageClassName}{"n"}{end}'
storage-1 100Mi longhorn
storage-2 100Mi longhorn
storage-3 100Mi longhorn
storage-4 100Mi longhorn
I want to add the name of the column i.e
pvc capacity storageclass
storage-1 100Mi longhorn
storage-2 100Mi longhorn
storage-3 100Mi longhorn
storage-4 100Mi longhorn
How do i achieve using the kubectl jspnpath query?