Skip to content

Instantly share code, notes, and snippets.

@jkinkead
Created September 7, 2017 21:04
Show Gist options
  • Save jkinkead/8b6695523014cd3ddb5b04fc849242fc to your computer and use it in GitHub Desktop.
Save jkinkead/8b6695523014cd3ddb5b04fc849242fc to your computer and use it in GitHub Desktop.
External HTTP+HTTPS Service
# Service definition for a http/https service.
apiVersion: v1
kind: Service
metadata:
name: echo-service
annotations:
# Note that the backend talks over HTTP.
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
# TODO: Fill in with the ARN of your certificate.
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:{region}:{user id}:certificate/{id}
# Only run SSL on the port named "https" below.
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
spec:
type: LoadBalancer
loadBalancerIP:
ports:
- port: 80
name: http
# Use named container port.
targetPort: backend-http
- port: 443
name: https
# Use named container port.
targetPort: backend-http
selector:
application: echo-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment