@@ -3,6 +3,13 @@ title: 使用 Calico 提供 NetworkPolicy
3
3
content_type : task
4
4
weight : 10
5
5
---
6
+ <!--
7
+ reviewers:
8
+ - caseydavenport
9
+ title: Use Calico for NetworkPolicy
10
+ content_type: task
11
+ weight: 10
12
+ -->
6
13
7
14
<!-- overview -->
8
15
<!--
@@ -26,44 +33,45 @@ Decide whether you want to deploy a [cloud](#creating-a-calico-cluster-with-goog
26
33
-->
27
34
## 在 Google Kubernetes Engine (GKE) 上创建一个 Calico 集群 {#gke-cluster}
28
35
29
- ** 先决条件** : [ gcloud] ( https://cloud.google.com/sdk/docs/quickstarts )
36
+ ** 先决条件** : [ gcloud] ( https://cloud.google.com/sdk/docs/quickstarts )
30
37
31
38
<!--
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.
33
40
-->
34
- 1 . 启动一个带有 Calico 的 GKE 集群,需要加上参数 ` --enable-network-policy ` 。
41
+ 1 . 启动一个带有 Calico 的 GKE 集群,需要加上参数 ` --enable-network-policy ` 。
35
42
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
+ ```
40
47
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
+ ```
45
52
46
53
<!--
47
- 1. To verify the deployment, use the following command.
54
+ 1. To verify the deployment, use the following command.
48
55
-->
49
- 2. 使用如下命令验证部署是否正确。
56
+ 2 . 使用如下命令验证部署是否正确。
57
+
58
+ ``` shell
59
+ kubectl get pods --namespace=kube-system
60
+ ```
50
61
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
+ -->
54
65
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 ` 。
59
67
60
68
<!--
61
69
## Creating a local Calico cluster with kubeadm
62
70
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
64
72
[Calico Quickstart](https://docs.projectcalico.org/latest/getting-started/kubernetes/).
65
73
-->
66
- # # 使用 kubeadm 创建一个本地 Calico 集群 {#local-cluster}
74
+ ## 使用 kubeadm 创建一个本地 Calico 集群 {#local-cluster}
67
75
68
76
使用 kubeadm 在 15 分钟内得到一个本地单主机 Calico 集群,请参考
69
77
[ 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
73
81
<!--
74
82
Once your cluster is running, you can follow the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/) to try out Kubernetes NetworkPolicy.
75
83
-->
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。
78
87
0 commit comments