Skip to content

Commit 639eee2

Browse files
authored
Merge pull request #40455 from asa3311/sync-cheatsheet.md
[zh-cn] sync cheatsheet.md
2 parents ed816c4 + 3588949 commit 639eee2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/zh-cn/docs/reference/kubectl/cheatsheet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ kubectl create cronjob hello --image=busybox:1.28 --schedule="*/1 * * * *" --
216216
kubectl explain pods # get the documentation for pod manifests
217217
218218
# Create multiple YAML objects from stdin
219-
cat <<EOF | kubectl apply -f -
219+
kubectl apply -f - <<EOF
220220
apiVersion: v1
221221
kind: Pod
222222
metadata:
@@ -243,7 +243,7 @@ spec:
243243
EOF
244244
245245
# Create a secret with several keys
246-
cat <<EOF | kubectl apply -f -
246+
kubectl apply -f - <<EOF
247247
apiVersion: v1
248248
kind: Secret
249249
metadata:
@@ -271,7 +271,7 @@ kubectl create cronjob hello --image=busybox:1.28 --schedule="*/1 * * * *" --
271271
kubectl explain pods # 获取 pod 清单的文档说明
272272

273273
# 从标准输入创建多个 YAML 对象
274-
cat <<EOF | kubectl apply -f -
274+
kubectl apply -f - <<EOF
275275
apiVersion: v1
276276
kind: Pod
277277
metadata:
@@ -298,7 +298,7 @@ spec:
298298
EOF
299299

300300
# 创建有多个 key 的 Secret
301-
cat <<EOF | kubectl apply -f -
301+
kubectl apply -f - <<EOF
302302
apiVersion: v1
303303
kind: Secret
304304
metadata:

0 commit comments

Comments
 (0)