Forked from harsha-y/kubernetes-example-deployment-with-service-type-loadbalancer-for-aws.j2.yml
Created
October 20, 2016 13:13
-
-
Save TaiSHiNet/596090a0a62eaec6b1ea710970d9d503 to your computer and use it in GitHub Desktop.
Kubernetes Example - Deployment with Service Type LoadBalancer for AWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Showing all available options for kubernetes services with loadbalancers setup | |
# Reference - https://github.com/kubernetes/kubernetes/blob/release-1.4/pkg/cloudprovider/providers/aws/aws.go | |
# | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:iam::0123456:server-certificate/star.foo.com | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http | |
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 | |
service.beta.kubernetes.io/aws-load-balancer-access-log-enabled: ? | |
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name: ? | |
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: ? | |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval: ? | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: ? | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: ? | |
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: ? | |
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: ? | |
name: {{ service_name }} | |
labels: | |
run: {{ service_name }} | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 443 | |
targetPort: 3000 | |
protocol: TCP | |
name: https | |
selector: | |
run: {{ service_name }} | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ service_name }} | |
spec: | |
replicas: 2 | |
template: | |
metadata: | |
labels: | |
run: {{ service_name }} | |
spec: | |
containers: | |
- name: {{ service_name }} | |
image: company/{{ service_name }}:version | |
ports: | |
- containerPort: 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment