You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/security/controlling-access.md
+36-24Lines changed: 36 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,12 @@ content_type: concept
4
4
weight: 50
5
5
---
6
6
<!--
7
-
---
8
7
reviewers:
9
8
- erictune
10
9
- lavalamp
11
10
title: Controlling Access to the Kubernetes API
12
11
content_type: concept
13
12
weight: 50
14
-
---
15
13
-->
16
14
17
15
<!-- overview -->
@@ -40,11 +38,15 @@ following diagram:
40
38
## 传输安全 {#transport-security}
41
39
42
40
<!--
43
-
By default, the Kubernetes API server listens on port 6443 on the first non-localhost network interface, protected by TLS. In a typical production Kubernetes cluster, the API serves on port 443. The port can be changed with the `--secure-port`, and the listening IP address with the `--bind-address` flag.
41
+
By default, the Kubernetes API server listens on port 6443 on the first non-localhost
42
+
network interface, protected by TLS. In a typical production Kubernetes cluster, the
43
+
API serves on port 443. The port can be changed with the `--secure-port`, and the
44
+
listening IP address with the `--bind-address` flag.
44
45
45
46
The API server presents a certificate. This certificate may be signed using
46
47
a private certificate authority (CA), or based on a public key infrastructure linked
47
-
to a generally recognized CA. The certificate and corresponding private key can be set by using the `--tls-cert-file` and `--tls-private-key-file` flags.
48
+
to a generally recognized CA. The certificate and corresponding private key can be set
49
+
by using the `--tls-cert-file` and `--tls-private-key-file` flags.
48
50
-->
49
51
默认情况下,Kubernetes API 服务器在第一个非 localhost 网络接口的 6443 端口上进行监听,
50
52
受 TLS 保护。在一个典型的 Kubernetes 生产集群中,API 使用 443 端口。
@@ -65,17 +67,18 @@ Your client can present a TLS client certificate at this stage.
65
67
66
68
你的客户端可以在此阶段出示 TLS 客户端证书。
67
69
68
-
<!-- ## Authentication -->
69
-
## 认证 {#authentication}
70
-
71
70
<!--
71
+
## Authentication
72
+
72
73
Once TLS is established, the HTTP request moves to the Authentication step.
73
74
This is shown as step **1** in the diagram.
74
75
The cluster creation script or cluster admin configures the API server to run
After the request is authenticated as coming from a specific user, the request must be authorized. This is shown as step **2** in the diagram.
118
+
## Authorization
119
119
120
-
A request must include the username of the requester, the requested action, and the object affected by the action. The request is authorized if an existing policy declares that the user has permissions to complete the requested action.
120
+
After the request is authenticated as coming from a specific user, the request must
121
+
be authorized. This is shown as step **2** in the diagram.
122
+
123
+
A request must include the username of the requester, the requested action, and
124
+
the object affected by the action. The request is authorized if an existing policy
125
+
declares that the user has permissions to complete the requested action.
121
126
122
127
For example, if Bob has the policy below, then he can read pods only in the namespace `projectCaribou`:
123
128
-->
129
+
## 鉴权 {#authorization}
130
+
124
131
如上图的步骤 **2** 所示,将请求验证为来自特定的用户后,请求必须被鉴权。
125
132
126
133
请求必须包含请求者的用户名、请求的行为以及受该操作影响的对象。
@@ -141,7 +148,8 @@ For example, if Bob has the policy below, then he can read pods only in the name
141
148
}
142
149
```
143
150
<!--
144
-
If Bob makes the following request, the request is authorized because he is allowed to read objects in the `projectCaribou` namespace:
151
+
If Bob makes the following request, the request is authorized because he is
152
+
allowed to read objects in the `projectCaribou` namespace:
145
153
-->
146
154
如果 Bob 执行以下请求,那么请求会被鉴权,因为允许他读取 `projectCaribou` 名称空间中的对象。
147
155
@@ -160,11 +168,14 @@ If Bob makes the following request, the request is authorized because he is allo
160
168
}
161
169
```
162
170
<!--
163
-
If Bob makes a request to write (`create` or `update`) to the objects in the `projectCaribou` namespace, his authorization is denied.
164
-
If Bob makes a request to read (`get`) objects in a different namespace such as `projectFish`, then his authorization is denied.
165
-
166
-
Kubernetes authorization requires that you use common REST attributes to interact with existing organization-wide or cloud-provider-wide access control systems.
167
-
It is important to use REST formatting because these control systems might interact with other APIs besides the Kubernetes API.
171
+
If Bob makes a request to write (`create` or `update`) to the objects in the
172
+
`projectCaribou` namespace, his authorization is denied. If Bob makes a request
173
+
to read (`get`) objects in a different namespace such as `projectFish`, then his authorization is denied.
174
+
175
+
Kubernetes authorization requires that you use common REST attributes to interact
176
+
with existing organization-wide or cloud-provider-wide access control systems.
177
+
It is important to use REST formatting because these control systems might
178
+
interact with other APIs besides the Kubernetes API.
168
179
-->
169
180
如果 Bob 在 `projectCaribou` 名字空间中请求写(`create` 或 `update`)对象,其鉴权请求将被拒绝。
170
181
如果 Bob 在诸如 `projectFish` 这类其它名字空间中请求读取(`get`)对象,其鉴权也会被拒绝。
@@ -179,8 +190,8 @@ If more than one authorization modules are configured, Kubernetes checks each mo
179
190
and if any module authorizes the request, then the request can proceed.
180
191
If all of the modules deny the request, then the request is denied (HTTP status code 403).
181
192
182
-
To learn more about Kubernetes authorization, including details about creating policies using the supported authorization modules,
183
-
see [Authorization](/docs/reference/access-authn-authz/authorization/).
193
+
To learn more about Kubernetes authorization, including details about creating
194
+
policies using the supported authorization modules, see [Authorization](/docs/reference/access-authn-authz/authorization/).
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/services-networking/ingress.md
+36-18Lines changed: 36 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ weight: 30
8
8
---
9
9
<!--
10
10
reviewers:
11
-
- bprashanth
11
+
- bprashanthluster: A set of Nodes that run containerized app
12
12
title: Ingress
13
13
content_type: concept
14
14
description: >-
@@ -36,10 +36,16 @@ For clarity, this guide defines the following terms:
36
36
37
37
<!--
38
38
* Node: A worker machine in Kubernetes, part of a cluster.
39
-
* Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.
40
-
* Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.
41
-
* Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes [networking model](/docs/concepts/cluster-administration/networking/).
42
-
* Service: A Kubernetes {{< glossary_tooltip term_id="service" >}} that identifies a set of Pods using {{< glossary_tooltip text="label" term_id="label" >}} selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.
39
+
* Cluster: A set of Nodes that run containerized applications managed by Kubernetes.
40
+
For this example, and in most common Kubernetes deployments, nodes in the cluster
41
+
are not part of the public internet.
42
+
* Edge router: A router that enforces the firewall policy for your cluster. This
43
+
could be a gateway managed by a cloud provider or a physical piece of hardware.
44
+
* Cluster network: A set of links, logical or physical, that facilitate communication
45
+
within a cluster according to the Kubernetes [networking model](/docs/concepts/cluster-administration/networking/).
46
+
* Service: A Kubernetes {{< glossary_tooltip term_id="service" >}} that identifies
47
+
a set of Pods using {{< glossary_tooltip text="label" term_id="label" >}} selectors.
48
+
Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.
43
49
-->
44
50
* 节点(Node): Kubernetes 集群中的一台工作机器,是集群的一部分。
45
51
* 集群(Cluster): 一组运行由 Kubernetes 管理的容器化应用程序的节点。
@@ -54,7 +60,8 @@ For clarity, this guide defines the following terms:
54
60
<!--
55
61
## What is Ingress?
56
62
57
-
[Ingress](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1-networking-k8s-io) exposes HTTP and HTTPS routes from outside the cluster to
An Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An [Ingress controller](/docs/concepts/services-networking/ingress-controllers) is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.
83
+
An Ingress may be configured to give Services externally-reachable URLs,
You must have an [Ingress controller](/docs/concepts/services-networking/ingress-controllers) to satisfy an Ingress. Only creating an Ingress resource has no effect.
107
+
You must have an [Ingress controller](/docs/concepts/services-networking/ingress-controllers)
108
+
to satisfy an Ingress. Only creating an Ingress resource has no effect.
You may need to deploy an Ingress controller such as [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/). You can choose from a number of
For general information about working with config files, see [deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/), [configuring containers](/docs/tasks/configure-pod-container/configure-pod-configmap/), [managing resources](/docs/concepts/cluster-administration/manage-deployment/).
140
-
Ingress frequently uses annotations to configure some options depending on the Ingress controller, an example of which
141
-
is the [rewrite-target annotation](https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/rewrite/README.md).
142
-
Different [Ingress controllers](/docs/concepts/services-networking/ingress-controllers) support different annotations. Review the documentation for
143
-
your choice of Ingress controller to learn which annotations are supported.
152
+
Ingress frequently uses annotations to configure some options depending on the Ingress controller, an example of which
153
+
is the [rewrite-target annotation](https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/rewrite/README.md).
154
+
Different [Ingress controllers](/docs/concepts/services-networking/ingress-controllers) support different annotations.
155
+
Review the documentation for your choice of Ingress controller to learn which annotations are supported.
@@ -200,7 +212,8 @@ Each HTTP rule contains the following information:
200
212
incoming request before the load balancer directs traffic to the referenced
201
213
Service.
202
214
* A backend is a combination of Service and port names as described in the
203
-
[Service doc](/docs/concepts/services-networking/service/) or a [custom resource backend](#resource-backend) by way of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CRD" >}}. HTTP (and HTTPS) requests to the
215
+
[Service doc](/docs/concepts/services-networking/service/) or a [custom resource backend](#resource-backend)
216
+
by way of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CRD" >}}. HTTP (and HTTPS) requests to the
204
217
Ingress that match the host and path of the rule are sent to the listed backend.
205
218
-->
206
219
* 可选的 `host`。在此示例中,未指定 `host`,因此该规则适用于通过指定 IP 地址的所有入站 HTTP 通信。
@@ -786,7 +802,9 @@ Ingress 控制器 IP 地址的任何网络流量,而无需基于名称的虚
786
802
787
803
<!--
788
804
For example, the following Ingress routes traffic
789
-
requested for `first.bar.com` to `service1`, `second.bar.com` to `service2`, and any traffic whose request host header doesn't match `first.bar.com` and `second.bar.com` to `service3`.
805
+
requested for `first.bar.com` to `service1`, `second.bar.com` to `service2`,
806
+
and any traffic whose request host header doesn't match `first.bar.com`
0 commit comments