Skip to content

Commit cde2abc

Browse files
authored
Merge pull request #37984 from windsonsea/calicoy
[zh] sync calico-network-policy.md
2 parents 0c63ced + 9ddf272 commit cde2abc

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

content/zh-cn/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ title: 使用 Calico 提供 NetworkPolicy
33
content_type: task
44
weight: 10
55
---
6+
<!--
7+
reviewers:
8+
- caseydavenport
9+
title: Use Calico for NetworkPolicy
10+
content_type: task
11+
weight: 10
12+
-->
613

714
<!-- overview -->
815
<!--
@@ -26,44 +33,45 @@ Decide whether you want to deploy a [cloud](#creating-a-calico-cluster-with-goog
2633
-->
2734
## 在 Google Kubernetes Engine (GKE) 上创建一个 Calico 集群 {#gke-cluster}
2835

29-
**先决条件**: [gcloud](https://cloud.google.com/sdk/docs/quickstarts)
36+
**先决条件**[gcloud](https://cloud.google.com/sdk/docs/quickstarts)
3037

3138
<!--
32-
1. To launch a GKE cluster with Calico, include the `--enable-network-policy` flag.
39+
1. To launch a GKE cluster with Calico, include the `--enable-network-policy` flag.
3340
-->
34-
1. 启动一个带有 Calico 的 GKE 集群,需要加上参数 `--enable-network-policy`
41+
1. 启动一个带有 Calico 的 GKE 集群,需要加上参数 `--enable-network-policy`
3542

36-
**语法**
37-
```shell
38-
gcloud container clusters create [CLUSTER_NAME] --enable-network-policy
39-
```
43+
**语法**
44+
```shell
45+
gcloud container clusters create [CLUSTER_NAME] --enable-network-policy
46+
```
4047

41-
**示例**
42-
```shell
43-
gcloud container clusters create my-calico-cluster --enable-network-policy
44-
```
48+
**示例**
49+
```shell
50+
gcloud container clusters create my-calico-cluster --enable-network-policy
51+
```
4552

4653
<!--
47-
1. To verify the deployment, use the following command.
54+
1. To verify the deployment, use the following command.
4855
-->
49-
2. 使用如下命令验证部署是否正确。
56+
2. 使用如下命令验证部署是否正确。
57+
58+
```shell
59+
kubectl get pods --namespace=kube-system
60+
```
5061

51-
```shell
52-
kubectl get pods --namespace=kube-system
53-
```
62+
<!--
63+
The Calico pods begin with `calico`. Check to make sure each one has a status of `Running`.
64+
-->
5465

55-
<!--
56-
The Calico pods begin with `calico`. Check to make sure each one has a status of `Running`.
57-
-->
58-
Calico 的 pods 名以 `calico` 打头,检查确认每个 pods 状态为 `Running`
66+
Calico 的 Pod 名以 `calico` 打头,检查确认每个 Pod 状态为 `Running`
5967

6068
<!--
6169
## Creating a local Calico cluster with kubeadm
6270
63-
To get a local single-host Calico cluster in fifteen minutes using kubeadm, refer to the
71+
To get a local single-host Calico cluster in fifteen minutes using kubeadm, refer to the
6472
[Calico Quickstart](https://docs.projectcalico.org/latest/getting-started/kubernetes/).
6573
-->
66-
## 使用 kubeadm 创建一个本地 Calico 集群 {#local-cluster}
74+
## 使用 kubeadm 创建一个本地 Calico 集群 {#local-cluster}
6775

6876
使用 kubeadm 在 15 分钟内得到一个本地单主机 Calico 集群,请参考
6977
[Calico 快速入门](https://docs.projectcalico.org/latest/getting-started/kubernetes/)
@@ -73,6 +81,7 @@ To get a local single-host Calico cluster in fifteen minutes using kubeadm, refe
7381
<!--
7482
Once your cluster is running, you can follow the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/) to try out Kubernetes NetworkPolicy.
7583
-->
76-
集群运行后,你可以按照[声明网络策略](/zh-cn/docs/tasks/administer-cluster/declare-network-policy/)
77-
去尝试使用 Kubernetes NetworkPolicy。
84+
集群运行后,
85+
你可以按照[声明网络策略](/zh-cn/docs/tasks/administer-cluster/declare-network-policy/)去尝试使用
86+
Kubernetes NetworkPolicy。
7887

0 commit comments

Comments
 (0)