Document app protocol (#7052)

* Document app protocol

* Fix lint
This commit is contained in:
John Howard 2020-04-10 06:58:58 -07:00 committed by GitHub
parent ce08f24799
commit ff8a72946a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -16,7 +16,13 @@ This can be done automatically or explicitly specified.
## Manual protocol selection
Protocols can be specified manually by naming the Service port `name: <protocol>[-<suffix>]`.
Protocols can be specified manually in the Service definition.
This can be configured in two ways:
- By the name of port the port, like `name: <protocol>[-<suffix>]`.
- In Kubernetes 1.18+, by the `appProtocol` field, like `appProtocol: <protocol>`.
The following protocols are supported:
- `grpc`
@ -34,7 +40,7 @@ The following protocols are supported:
\* These protocols are disabled by default to avoid accidentally enabling experimental features.
To enable them, configure the corresponding Pilot [environment variables](/docs/reference/commands/pilot-discovery/#envvars).
Below is an example of a Service that defines a `mysql` port and an `http` port:
Below is an example of a Service that defines a `mysql` port by `appProtocol` and an `http` port by name:
{{< text yaml >}}
kind: Service
@ -43,7 +49,8 @@ metadata:
spec:
ports:
- number: 3306
name: mysql
name: database
appProtocol: mysql
- number: 80
name: http-web
{{< /text >}}