Add a kubectl tip for working with keys with dots
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user