Add a kubectl tip for working with keys with dots

This commit is contained in:
Qiming Teng
2020-07-02 16:30:52 +08:00
parent 33f6fd9aa4
commit 4ddc1663f2
@@ -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'