Merge pull request #22273 from tengqm/add-jsonpath-tip

Add a kubectl tip for working with keys with dots
This commit is contained in:
Kubernetes Prow Robot
2020-07-11 10:25:21 -07:00
committed by GitHub
@@ -166,6 +166,10 @@ kubectl get pv --sort-by=.spec.capacity.storage
kubectl get pods --selector=app=cassandra -o \
jsonpath='{.items[*].metadata.labels.version}'
# Retrieve the value of a key with dots, e.g. 'ca.crt'
kubectl get configmap myconfig \
-o jsonpath='{.data.ca\.crt}'
# Get all worker nodes (use a selector to exclude results that have a label
# named 'node-role.kubernetes.io/master')
kubectl get node --selector='!node-role.kubernetes.io/master'