Merge pull request #32491 from stemid/patch-1
Cheatsheet syntax to retrieve Secret values with dashes (-) in their key names
This commit is contained in:
@@ -187,6 +187,9 @@ kubectl get pods --selector=app=cassandra -o \
|
|||||||
kubectl get configmap myconfig \
|
kubectl get configmap myconfig \
|
||||||
-o jsonpath='{.data.ca\.crt}'
|
-o jsonpath='{.data.ca\.crt}'
|
||||||
|
|
||||||
|
# Retrieve a base64 encoded value with dashes instead of underscores.
|
||||||
|
kubectl get secret my-secret --template='{{index .data "key-name-with-dashes"}}'
|
||||||
|
|
||||||
# Get all worker nodes (use a selector to exclude results that have a label
|
# Get all worker nodes (use a selector to exclude results that have a label
|
||||||
# named 'node-role.kubernetes.io/control-plane')
|
# named 'node-role.kubernetes.io/control-plane')
|
||||||
kubectl get node --selector='!node-role.kubernetes.io/control-plane'
|
kubectl get node --selector='!node-role.kubernetes.io/control-plane'
|
||||||
|
|||||||
Reference in New Issue
Block a user