Skip to content

Commit f6adf58

Browse files
committed
[zh] sync cilium-network-policy.md
1 parent 97cc77e commit f6adf58

File tree

1 file changed

+68
-50
lines changed

1 file changed

+68
-50
lines changed

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

Lines changed: 68 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ to perform a basic DaemonSet installation of Cilium in minikube.
3939
To start minikube, minimal version required is >= v1.5.2, run the with the
4040
following arguments:
4141
-->
42-
## 在 Minikube 上部署 Cilium 用于基本测试
42+
## 在 Minikube 上部署 Cilium 用于基本测试 {#deploying-cilium-on-minikube-for-basic-testing}
4343

44-
为了轻松熟悉 Cilium 你可以根据
44+
为了轻松熟悉 Cilium你可以根据
4545
[Cilium Kubernetes 入门指南](https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/s)
46-
在 minikube 中执行一个 cilium 的基本 DaemonSet 安装。
46+
在 minikube 中执行一个 Cilium 的基本 DaemonSet 安装。
4747

4848
要启动 minikube,需要的最低版本为 1.5.2,使用下面的参数运行:
4949

@@ -55,58 +55,75 @@ minikube version: v1.5.2
5555
```
5656

5757
```shell
58-
minikube start --network-plugin=cni --memory=4096
58+
minikube start --network-plugin=cni
5959
```
6060

6161
<!--
62-
For minikube you can install Cilium using its CLI tool. Cilium will
63-
automatically detect the cluster configuration and will install the appropriate
64-
components for a successful installation:
62+
For minikube you can install Cilium using its CLI tool. To do so, first download the latest
63+
version of the CLI with the following command:
6564
-->
6665
对于 minikube 你可以使用 Cilium 的 CLI 工具安装它。
67-
Cilium 将自动检测集群配置并为成功的集群部署选择合适的组件。
66+
为此,先用以下命令下载最新版本的 CLI:
6867

6968
```shell
7069
curl -LO https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz
70+
```
71+
72+
<!--
73+
Then extract the downloaded file to your `/usr/local/bin` directory with the following command:
74+
-->
75+
然后用以下命令将下载的文件解压缩到你的 `/usr/local/bin` 目录:
76+
77+
```shell
7178
sudo tar xzvfC cilium-linux-amd64.tar.gz /usr/local/bin
7279
rm cilium-linux-amd64.tar.gz
73-
cilium install
7480
```
81+
82+
<!--
83+
After running the above commands, you can now install Cilium with the following command:
84+
-->
85+
运行上述命令后,你现在可以用以下命令安装 Cilium:
86+
87+
```shell
88+
cilium install
7589
```
76-
🔮 Auto-detected Kubernetes kind: minikube
77-
✨ Running "minikube" validation checks
78-
✅ Detected minikube version "1.20.0"
79-
ℹ️ Cilium version not set, using default version "v1.10.0"
80-
🔮 Auto-detected cluster name: minikube
81-
🔮 Auto-detected IPAM mode: cluster-pool
82-
🔮 Auto-detected datapath mode: tunnel
83-
🔑 Generating CA...
84-
2021/05/27 02:54:44 [INFO] generate received request
85-
2021/05/27 02:54:44 [INFO] received CSR
86-
2021/05/27 02:54:44 [INFO] generating key: ecdsa-256
87-
2021/05/27 02:54:44 [INFO] encoded CSR
88-
2021/05/27 02:54:44 [INFO] signed certificate with serial number 48713764918856674401136471229482703021230538642
89-
🔑 Generating certificates for Hubble...
90-
2021/05/27 02:54:44 [INFO] generate received request
91-
2021/05/27 02:54:44 [INFO] received CSR
92-
2021/05/27 02:54:44 [INFO] generating key: ecdsa-256
93-
2021/05/27 02:54:44 [INFO] encoded CSR
94-
2021/05/27 02:54:44 [INFO] signed certificate with serial number 3514109734025784310086389188421560613333279574
95-
🚀 Creating Service accounts...
96-
🚀 Creating Cluster roles...
97-
🚀 Creating ConfigMap...
98-
🚀 Creating Agent DaemonSet...
99-
🚀 Creating Operator Deployment...
100-
⌛ Waiting for Cilium to be installed...
101-
```
90+
91+
<!--
92+
Cilium will then automatically detect the cluster configuration and create and
93+
install the appropriate components for a successful installation.
94+
The components are:
95+
96+
- Certificate Authority (CA) in Secret `cilium-ca` and certificates for Hubble (Cilium's observability layer).
97+
- Service accounts.
98+
- Cluster roles.
99+
- ConfigMap.
100+
- Agent DaemonSet and an Operator Deployment.
101+
-->
102+
随后 Cilium 将自动检测集群配置,并创建和安装合适的组件以成功完成安装。
103+
这些组件为:
104+
105+
- Secret `cilium-ca` 中的证书机构 (CA) 和 Hubble(Cilium 的可观测层)所用的证书。
106+
- 服务账号。
107+
- 集群角色。
108+
- ConfigMap。
109+
- Agent DaemonSet 和 Operator Deployment。
110+
111+
<!--
112+
After the installation, you can view the overall status of the Cilium deployment with the `cilium status` command.
113+
See the expected output of the `status` command
114+
[here](https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#validate-the-installation).
115+
-->
116+
安装之后,你可以用 `cilium status` 命令查看 Cilium Deployment 的整体状态。
117+
[在此处](https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#validate-the-installation)查看
118+
`status` 命令的预期输出。
102119

103120
<!--
104121
The remainder of the Getting Started Guide explains how to enforce both L3/L4
105122
(i.e., IP address + port) security policies, as well as L7 (e.g., HTTP) security
106123
policies using an example application.
107124
-->
108-
入门指南其余的部分用一个示例应用说明了如何强制执行 L3/L4(即 IP 地址+端口)的安全策略
109-
以及L7 (如 HTTP)的安全策略。
125+
入门指南其余的部分用一个示例应用说明了如何强制执行 L3/L4(即 IP 地址 + 端口)的安全策略以及
126+
L7 (如 HTTP)的安全策略。
110127

111128
<!--
112129
## Deploying Cilium for Production Use
@@ -116,10 +133,10 @@ For detailed instructions around deploying Cilium for production, see:
116133
This documentation includes detailed requirements, instructions and example
117134
production DaemonSet files.
118135
-->
119-
## 部署 Cilium 用于生产用途
136+
## 部署 Cilium 用于生产用途 {#deployment-cilium-for-production-use}
120137

121-
关于部署 Cilium 用于生产的详细说明,请见
122-
[Cilium Kubernetes 安装指南](https://docs.cilium.io/en/stable/concepts/kubernetes/intro/)
138+
关于部署 Cilium 用于生产的详细说明,请参见
139+
[Cilium Kubernetes 安装指南](https://docs.cilium.io/en/stable/concepts/kubernetes/intro/)
123140
此文档包括详细的需求、说明和生产用途 DaemonSet 文件示例。
124141

125142
<!-- discussion -->
@@ -129,17 +146,19 @@ production DaemonSet files.
129146
130147
Deploying a cluster with Cilium adds Pods to the `kube-system` namespace. To see
131148
this list of Pods run:
132-
-->
133-
## 了解 Cilium 组件
149+
-->
150+
## 了解 Cilium 组件 {#understanding-cilium-components}
134151

135-
部署使用 Cilium 的集群会添加 Pods`kube-system` 命名空间。要查看 Pod 列表,运行:
152+
部署使用 Cilium 的集群会添加 Pod`kube-system` 命名空间。要查看 Pod 列表,运行:
136153

137154
```shell
138155
kubectl get pods --namespace=kube-system -l k8s-app=cilium
139156
```
140157

141-
<!-- You'll see a list of Pods similar to this: -->
142-
你将看到像这样的 Pods 列表:
158+
<!--
159+
You'll see a list of Pods similar to this:
160+
-->
161+
你将看到像这样的 Pod 列表:
143162

144163
```console
145164
NAME READY STATUS RESTARTS AGE
@@ -163,9 +182,8 @@ to try out Kubernetes NetworkPolicy with Cilium.
163182
Have fun, and if you have questions, contact us using the
164183
[Cilium Slack Channel](https://cilium.herokuapp.com/).
165184
-->
166-
集群运行后,你可以按照
167-
[声明网络策略](/zh-cn/docs/tasks/administer-cluster/declare-network-policy/)
168-
试用基于 Cilium 的 Kubernetes NetworkPolicy。
169-
玩得开心,如果你有任何疑问,请到 [Cilium Slack 频道](https://cilium.herokuapp.com/)
170-
联系我们。
185+
集群运行后,
186+
你可以按照[声明网络策略](/zh-cn/docs/tasks/administer-cluster/declare-network-policy/)试用基于
187+
Cilium 的 Kubernetes NetworkPolicy。玩得开心,如果你有任何疑问,请到
188+
[Cilium Slack 频道](https://cilium.herokuapp.com/)联系我们。
171189

0 commit comments

Comments
 (0)