Skip to content

Commit f1606cc

Browse files
Simplify kubectl heredoc usage in cheatsheet
Remove the unnecessary cat command.
1 parent 0d92c72 commit f1606cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ kubectl create cronjob hello --image=busybox:1.28 --schedule="*/1 * * * *" --
115115
kubectl explain pods # get the documentation for pod manifests
116116

117117
# Create multiple YAML objects from stdin
118-
cat <<EOF | kubectl apply -f -
118+
kubectl apply -f - <<EOF
119119
apiVersion: v1
120120
kind: Pod
121121
metadata:
@@ -142,7 +142,7 @@ spec:
142142
EOF
143143

144144
# Create a secret with several keys
145-
cat <<EOF | kubectl apply -f -
145+
kubectl apply -f - <<EOF
146146
apiVersion: v1
147147
kind: Secret
148148
metadata:

0 commit comments

Comments
 (0)