|
| 1 | +--- |
| 2 | +title: Cloud Providers |
| 3 | +--- |
| 4 | + |
| 5 | +{% capture overview %} |
| 6 | +This page explains how to manage Kubernetes running on a specific |
| 7 | +cloud provider. |
| 8 | +{% endcapture %} |
| 9 | + |
| 10 | +{% capture body %} |
| 11 | +# AWS |
| 12 | +This section describes all the possible configurations which can |
| 13 | +be used when running Kubernetes on Amazon Web Services. |
| 14 | + |
| 15 | +## Load Balancers |
| 16 | +You can setup [external load balancers](/docs/tasks/access-application-cluster/create-external-load-balancer) |
| 17 | +to use specific features in AWS by configuring the annotations as shown below. |
| 18 | + |
| 19 | +```yaml |
| 20 | +apiVersion: v1 |
| 21 | +kind: Service |
| 22 | +metadata: |
| 23 | + name: example |
| 24 | + namespace: kube-system |
| 25 | + labels: |
| 26 | + run: example |
| 27 | + annotations: |
| 28 | + service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:xx-xxxx-x:xxxxxxxxx:xxxxxxx/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx #replace this value |
| 29 | + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http |
| 30 | +spec: |
| 31 | + type: LoadBalancer |
| 32 | + ports: |
| 33 | + - port: 443 |
| 34 | + targetPort: 5556 |
| 35 | + protocol: TCP |
| 36 | + selector: |
| 37 | + app: example |
| 38 | +``` |
| 39 | +Different settings can be applied to a load balancer service in AWS using _annotations_. The following describes the annotations supported on AWS ELBs: |
| 40 | +
|
| 41 | +* `service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval`: Used to specify access log emit interval. |
| 42 | +* `service.beta.kubernetes.io/aws-load-balancer-access-log-enabled`: Used on the service to enable or disable access logs. |
| 43 | +* `service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name`: Used to specify access log s3 bucket name. |
| 44 | +* `service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix`: Used to specify access log s3 bucket prefix. |
| 45 | +* `service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags`: Used on the service to specify a comma-separated list of key-value pairs which will be recorded as additional tags in the ELB. For example: `"Key1=Val1,Key2=Val2,KeyNoVal1=,KeyNoVal2"`. |
| 46 | +* `service.beta.kubernetes.io/aws-load-balancer-backend-protocol`: Used on the service to specify the protocol spoken by the backend (pod) behind a listener. If `http` (default) or `https`, an HTTPS listener that terminates the connection and parses headers is created. If set to `ssl` or `tcp`, a "raw" SSL listener is used. If set to `http` and `aws-load-balancer-ssl-cert` is not used then a HTTP listener is used. |
| 47 | +* `service.beta.kubernetes.io/aws-load-balancer-ssl-cert`: Used on the service to request a secure listener. Value is a valid certificate ARN. For more, see http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html CertARN is an IAM or CM certificate ARN, e.g. `arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012`. |
| 48 | +* `service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled`: Used on the service to enable or disable connection draining. |
| 49 | +* `service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout`: Used on the service to specify a connection draining timeout. |
| 50 | +* `service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout`: Used on the service to specify the idle connection timeout. |
| 51 | +* `service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled`: Used on the service to enable or disable cross-zone load balancing. |
| 52 | +* `service.beta.kubernetes.io/aws-load-balancer-extra-security-groups`: Used one the service to specify additional security groups to be added to ELB created |
| 53 | +* `service.beta.kubernetes.io/aws-load-balancer-internal`: Used on the service to indicate that we want an internal ELB. |
| 54 | +* `service.beta.kubernetes.io/aws-load-balancer-proxy-protocol`: Used on the service to enable the proxy protocol on an ELB. Right now we only accept the value `*` which means enable the proxy protocol on all ELB backends. In the future we could adjust this to allow setting the proxy protocol only on certain backends. |
| 55 | +* `service.beta.kubernetes.io/aws-load-balancer-ssl-ports`: Used on the service to specify a comma-separated list of ports that will use SSL/HTTPS listeners. Defaults to `*` (all) |
| 56 | + |
| 57 | +The information for the annotations for AWS is taken from the comments on [aws.go](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go) |
| 58 | + |
| 59 | +{% endcapture %} |
| 60 | + |
| 61 | +{% include templates/concept.md %} |
0 commit comments