<p>Here is the config for our current EKS service:</p>

<pre><code>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
</code></pre>

<p>is there a way to configure it to use HTTPS instead of HTTP?</p>

<p>To terminate HTTPS traffic on Amazon Elastic Kubernetes Service and pass it to a backend:</p>
<p>1.    <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html" rel="noreferrer">Request a public ACM certificate</a> for your custom domain.</p>
<p>2.    Identify the <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-describe.html#gs-acm-describe-console" rel="noreferrer">ARN of the certificate</a> that you want to use with the load balancer's HTTPS listener.</p>
<p>3.    In your text editor, create a <strong>service.yaml</strong> manifest file based on the following example. Then, edit the annotations to provide the ACM ARN from step 2.</p>
<pre><code>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 &quot;https&quot; below.
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: &quot;https&quot;

spec:
  type: LoadBalancer
  selector:
    app: echo-pod
  ports:
  - name: http
    port: 80
    targetPort: 8080
  - name: https
    port: 443
    targetPort: 8080
</code></pre>
<p>4.    To create a <strong>Service</strong> object, run the following command:</p>
<pre><code>$ kubectl create -f service.yaml
</code></pre>
<p>5.    To return the DNS URL of the service of type <strong>LoadBalancer</strong>, run the following command:</p>
<pre><code>$ kubectl get service
</code></pre>
<p><strong>Note:</strong> If you have many active services running in your cluster, be sure to get the URL of the right service of type <strong>LoadBalancer</strong> from the command output.</p>
<p>6.    Open the <a href="https://console.aws.amazon.com/ec2/" rel="noreferrer">Amazon EC2 console</a>, and then choose <strong>Load Balancers</strong>.</p>
<p>7.    Select your load balancer, and then choose <strong>Listeners</strong>.</p>
<p>8.    For <strong>Listener ID</strong>, confirm that your load balancer port is set to <strong>443</strong>.</p>
<p>9.    For <strong>SSL Certificate</strong>, confirm that the SSL certificate that you defined in the YAML file is attached to your load balancer.</p>
<p>10.    <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html#dns-associate-custom-elb" rel="noreferrer">Associate your custom domain name with your load balancer name</a>.</p>
<p>11.    Finally, In a web browser, test your custom domain with the following HTTPS protocol:</p>
<pre><code>https://yourdomain.com
</code></pre>
