Skip to content

Commit 91fb824

Browse files
committed
[zh-cn]sync kubectl_diff kubectl_get
Signed-off-by: xin.li <xin.li@daocloud.io>
1 parent 703ceac commit 91fb824

2 files changed

Lines changed: 75 additions & 27 deletions

File tree

content/zh-cn/docs/reference/kubectl/generated/kubectl_diff/_index.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ title: kubectl diff
33
content_type: tool-reference
44
weight: 30
55
no_list: true
6+
description: >-
7+
将实际版本与拟应用的版本进行比较
68
---
79
<!--
810
title: kubectl diff
911
content_type: tool-reference
1012
weight: 30
1113
auto_generated: true
1214
no_list: true
15+
description: >-
16+
Diff the live version against a would-be applied version
1317
-->
1418

1519
## {{% heading "synopsis" %}}
@@ -535,7 +539,8 @@ Kubernetes API 服务器的地址和端口。
535539
Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction
536540
-->
537541
对存储驱动的写入操作将被缓存的时长;缓存的操作会作为一个事务提交给非内存后端。
538-
</p></td>
542+
</p>
543+
</td>
539544
</tr>
540545

541546
<tr>
@@ -548,7 +553,8 @@ Writes in the storage driver will be buffered for this duration, and committed t
548553
database name
549554
-->
550555
数据库名称。
551-
</p></td>
556+
</p>
557+
</td>
552558
</tr>
553559

554560
<tr>
@@ -561,7 +567,8 @@ database name
561567
database host:port
562568
-->
563569
数据库 host:port
564-
</p></td>
570+
</p>
571+
</td>
565572
</tr>
566573

567574
<tr>
@@ -574,7 +581,8 @@ database host:port
574581
database password
575582
-->
576583
数据库密码。
577-
</p></td>
584+
</p>
585+
</td>
578586
</tr>
579587

580588
<tr>
@@ -587,7 +595,8 @@ database password
587595
use secure connection with database
588596
-->
589597
使用与数据库的安全连接。
590-
</p></td>
598+
</p>
599+
</td>
591600
</tr>
592601

593602
<tr>
@@ -600,7 +609,8 @@ use secure connection with database
600609
table name
601610
-->
602611
表名。
603-
</p></td>
612+
</p>
613+
</td>
604614
</tr>
605615

606616
<tr>
@@ -613,7 +623,8 @@ table name
613623
database username
614624
-->
615625
数据库用户名。
616-
</p></td>
626+
</p>
627+
</td>
617628
</tr>
618629

619630
<tr>
@@ -626,7 +637,8 @@ database username
626637
Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
627638
-->
628639
服务器证书验证所用的服务器名称。如果未提供,则使用与服务器通信所用的主机名。
629-
</p></td>
640+
</p>
641+
</td>
630642
</tr>
631643

632644
<tr>
@@ -639,7 +651,8 @@ Server name to use for server certificate validation. If it is not provided, the
639651
Bearer token for authentication to the API server
640652
-->
641653
向 API 服务器进行身份认证的持有者令牌。
642-
</p></td>
654+
</p>
655+
</td>
643656
</tr>
644657

645658
<tr>
@@ -652,7 +665,8 @@ Bearer token for authentication to the API server
652665
The name of the kubeconfig user to use
653666
-->
654667
要使用的 kubeconfig 用户的名称。
655-
</p></td>
668+
</p>
669+
</td>
656670
</tr>
657671

658672
<tr>
@@ -665,7 +679,8 @@ The name of the kubeconfig user to use
665679
Username for basic authentication to the API server
666680
-->
667681
向 API 服务器进行基本身份认证时所用的用户名。
668-
</p></td>
682+
</p>
683+
</td>
669684
</tr>
670685

671686
<tr>
@@ -678,7 +693,8 @@ Username for basic authentication to the API server
678693
--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version
679694
-->
680695
--version, --version=raw 打印版本信息并退出;--version=vX.Y.Z... 设置报告的版本。
681-
</p></td>
696+
</p>
697+
</td>
682698
</tr>
683699

684700
<tr>
@@ -691,7 +707,8 @@ Username for basic authentication to the API server
691707
Treat warnings received from the server as errors and exit with a non-zero exit code
692708
-->
693709
将从服务器收到的警告视为错误,并以非零退出码退出。
694-
</p></td>
710+
</p>
711+
</td>
695712
</tr>
696713

697714
</tbody>

content/zh-cn/docs/reference/kubectl/generated/kubectl_get/_index.md

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ title: kubectl get
33
content_type: tool-reference
44
weight: 30
55
no_list: true
6+
description: >-
7+
显示一个或多个资源
68
---
79
<!--
810
title: kubectl get
911
content_type: tool-reference
1012
weight: 30
1113
auto_generated: true
1214
no_list: true
15+
description: >-
16+
Display one or many resources
1317
-->
1418

1519
## {{% heading "synopsis" %}}
@@ -43,20 +47,47 @@ kubectl get [(-o|--output=)json|yaml|kyaml|name|go-template|go-template-file|tem
4347

4448
<!--
4549
```
46-
# List all pods in ps output format
47-
# List all pods in ps output format with more information (such as node name)
48-
# List a single replication controller with specified NAME in ps output format
49-
# List deployments in JSON output format, in the "v1" version of the "apps" API group
50-
# List a single pod in JSON output format
51-
# List a pod identified by type and name specified in "pod.yaml" in JSON output format
52-
# List resources from a directory with kustomization.yaml - e.g. dir/kustomization.yaml
53-
# Return only the phase value of the specified pod
54-
# List resource information in custom columns
55-
# List all replication controllers and services together in ps output format
56-
# List one or more resources by their type and names
57-
# List the 'status' subresource for a single pod
58-
# List all deployments in namespace 'backend'
59-
# List all pods existing in all namespaces
50+
# List all pods in ps output format
51+
kubectl get pods
52+
53+
# List all pods in ps output format with more information (such as node name)
54+
kubectl get pods -o wide
55+
56+
# List a single replication controller with specified NAME in ps output format
57+
kubectl get replicationcontroller web
58+
59+
# List deployments in JSON output format, in the "v1" version of the "apps" API group
60+
kubectl get deployments.v1.apps -o json
61+
62+
# List a single pod in JSON output format
63+
kubectl get -o json pod web-pod-13je7
64+
65+
# List a pod identified by type and name specified in "pod.yaml" in JSON output format
66+
kubectl get -f pod.yaml -o json
67+
68+
# List resources from a directory with kustomization.yaml - e.g. dir/kustomization.yaml
69+
kubectl get -k dir/
70+
71+
# Return only the phase value of the specified pod
72+
kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}
73+
74+
# List resource information in custom columns
75+
kubectl get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image
76+
77+
# List all replication controllers and services together in ps output format
78+
kubectl get rc,services
79+
80+
# List one or more resources by their type and names
81+
kubectl get rc/web service/frontend pods/web-pod-13je7
82+
83+
# List the 'status' subresource for a single pod
84+
kubectl get pod web-pod-13je7 --subresource status
85+
86+
# List all deployments in namespace 'backend'
87+
kubectl get deployments.apps --namespace backend
88+
89+
# List all pods existing in all namespaces
90+
kubectl get pods --all-namespaces
6091
```
6192
-->
6293
```shell

0 commit comments

Comments
 (0)