Complete documentation of SSL-on-AWS. (#5357)
The SSL-on-AWS documentation was missing a critical annotation, without which SSL termination doesn't work (all ports are configured to use SSL). This also fixes the indentation of the existing YAML.
This commit is contained in:
committed by
Steve Perry
parent
fdbe5086a0
commit
eac3d83e94
@@ -479,22 +479,22 @@ metadata:
|
|||||||
{% include tabs.md %}
|
{% include tabs.md %}
|
||||||
|
|
||||||
#### SSL support on AWS
|
#### SSL support on AWS
|
||||||
For partial SSL support on clusters running on AWS, starting with 1.3 two
|
For partial SSL support on clusters running on AWS, starting with 1.3 three
|
||||||
annotations can be added to a `LoadBalancer` service:
|
annotations can be added to a `LoadBalancer` service:
|
||||||
|
|
||||||
```
|
```
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
annotations:
|
annotations:
|
||||||
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
|
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
|
||||||
```
|
```
|
||||||
|
|
||||||
The first specifies which certificate to use. It can be either a
|
The first specifies the ARN of the certificate to use. It can be either a
|
||||||
certificate from a third party issuer that was uploaded to IAM or one created
|
certificate from a third party issuer that was uploaded to IAM or one created
|
||||||
within AWS Certificate Manager.
|
within AWS Certificate Manager.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
annotations:
|
annotations:
|
||||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: (https|http|ssl|tcp)
|
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: (https|http|ssl|tcp)
|
||||||
@@ -512,6 +512,40 @@ ELB at the other end of its connection) when forwarding requests.
|
|||||||
TCP and SSL will select layer 4 proxying: the ELB will forward traffic without
|
TCP and SSL will select layer 4 proxying: the ELB will forward traffic without
|
||||||
modifying the headers.
|
modifying the headers.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
metadata:
|
||||||
|
name: my-service
|
||||||
|
annotations:
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: (comma-separated-port-names)
|
||||||
|
```
|
||||||
|
|
||||||
|
The third annotation indicates which port(s) should accept SSL traffic on the ELB. If a certificate is set on the
|
||||||
|
Service, the default is to configure all ports on the ELB to use SSL. This is not typically desired for HTTP servers.
|
||||||
|
|
||||||
|
A complete HTTP Service supporting SSL might look like:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: my-service
|
||||||
|
annotations:
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
|
||||||
|
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http
|
||||||
|
targetPort: 8080
|
||||||
|
- port: 443
|
||||||
|
name: https
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
app: MyApp
|
||||||
|
```
|
||||||
|
|
||||||
### External IPs
|
### External IPs
|
||||||
|
|
||||||
If there are external IPs that route to one or more cluster nodes, Kubernetes services can be exposed on those
|
If there are external IPs that route to one or more cluster nodes, Kubernetes services can be exposed on those
|
||||||
|
|||||||
Reference in New Issue
Block a user