Is there a way to configure an EKS service to use HTTPS?

6/10/2019

Here is the config for our current EKS service:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: main-api
  name: main-api-svc
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
  externalTrafficPolicy: Cluster
  ports:
    - name: http-port
      port: 80
      protocol: TCP
      targetPort: 80
  selector:
    app: main-api
  sessionAffinity: None
  type: LoadBalancer

is there a way to configure it to use HTTPS instead of HTTP?

--
eks
https
kubernetes
service

1 Answer

7/7/2019

You should use an ingress (and not a service) to expose http/s outside of the cluster I suggest using the ALB Ingress Controller

There is a complete walkthrough here

and you can see how to setup TLS/SSL here

-- Eran Chetzroni
Source: StackOverflow