add more protocol (#2965)

This commit is contained in:
Chunlin Yang 2018-12-20 02:15:06 +08:00 committed by Martin Taillefer
parent c0d784e0d4
commit 841b321905
4 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ To be a part of the service mesh, pods and services in a Kubernetes
cluster must satisfy the following requirements:
* _**Named ports**:_ Service ports must be named. The port names must be of
the form `<protocol>[-<suffix>]` with _http_, _http2_, _grpc_, _mongo_, or _redis_
the form `<protocol>[-<suffix>]` with `grpc`, `http`, `http2`, `https`, `mongo`, `redis`, `tcp`, `tls` or `udp`
as the `<protocol>` in order to take advantage of Istio's routing features.
For example, `name: http2-foo` or `name: http` are valid port names, but
`name: http2foo` is not. If the port name does not begin with a recognized

View File

@ -5,7 +5,7 @@ weight: 50
Named ports: Service ports must be named.
The port names must be of the form `protocol`-`suffix` with http, http2, grpc, mongo, or redis as the `protocol` in order to take advantage of Istios routing features.
The port names must be of the form `protocol`-`suffix` with `grpc`, `http`, `http2`, `https`, `mongo`, `redis`, `tcp`, `tls` or `udp` as the `protocol` in order to take advantage of Istios routing features.
For example, `name: http2-foo` or `name: http` are valid port names, but `name: http2foo` is not. If the port name does not begin with a recognized prefix or if the port is unnamed, traffic on the port will be treated as plain TCP traffic (unless the port explicitly uses Protocol: UDP to signify a UDP port).

View File

@ -7,7 +7,7 @@ keywords: [kubernetes,sidecar,sidecar-injection]
要成为服务网格的一部分Kubernetes 集群中的 Pod 和服务必须满足以下几个要求:
1. **需要给端口正确命名**:服务端口必须进行命名。端口名称只允许是`<协议>[-<后缀>-]`模式,其中`<协议>`部分可选择范围包括 `http`、`http2`、`grpc`、`mongo` 以及 `redis`Istio 可以通过对这些协议的支持来提供路由能力。例如 `name: http2-foo``name: http` 都是有效的端口名,但 `name: http2foo` 就是无效的。如果没有给端口进行命名,或者命名没有使用指定前缀,那么这一端口的流量就会被视为普通 TCP 流量(除非[显式](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service)的用 `Protocol: UDP` 声明该端口是 UDP 端口)。
1. **需要给端口正确命名**:服务端口必须进行命名。端口名称只允许是`<协议>[-<后缀>-]`模式,其中`<协议>`部分可选择范围包括 `grpc`、`http`、`http2`、`https`、`mongo`、`redis`、`tcp`、`tls` 以及 `udp`Istio 可以通过对这些协议的支持来提供路由能力。例如 `name: http2-foo``name: http` 都是有效的端口名,但 `name: http2foo` 就是无效的。如果没有给端口进行命名,或者命名没有使用指定前缀,那么这一端口的流量就会被视为普通 TCP 流量(除非[显式](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service)的用 `Protocol: UDP` 声明该端口是 UDP 端口)。
1. **关联服务**Pod 必须关联到 [Kubernetes 服务](https://kubernetes.io/docs/concepts/services-networking/service/),如果一个 Pod 属于多个服务,这些服务不能再同一端口上使用不同协议,例如 HTTP 和 TCP。
1. **Deployment 应带有 `app` 以及 `version` 标签**:在使用 Kubernetes `Deployment` 进行 Pod 部署的时候,建议显式的为 `Deployment` 加上 `app` 以及 `version` 标签。每个 Deployment 都应该有一个有意义的 `app` 标签和一个用于标识 `Deployment` 版本的 `version` 标签。`app` 标签在分布式跟踪的过程中会被用来加入上下文信息。Istio 还会用 `app``version` 标签来给遥测指标数据加入上下文信息。
1. _**Application UID**_**不要**使用 IDUID值为 **1337** 的用户来运行应用。

View File

@ -5,6 +5,6 @@ weight: 50
命名端口:服务端口必须进行命名。
为利用 Istio 的路由功能,端口名称必须是 `protocol-suffix` 形式,其中 `protocol` 可为 `http`、`http2`、`grpc`、`mongo` 或 `redis`。
为利用 Istio 的路由功能,端口名称必须是 `protocol-suffix` 形式,其中 `protocol` 可为 `grpc`、`http`、`http2`、`https`、`mongo`、`redis`、`tcp`、`tls` 或 `udp`。
例如,`name: http2-foo` 或 `name: http` 是有效的端口名称,但 `name:http2foo` 则不是。如果端口名称以不识别的前缀开头,或者端口未命名,则端口上的流量将被视为普通 TCP 流量除非端口明确指定了使用协议UDP 表示 UDP 端口)。