EKS Ingress

Set up Kubernetes Ingress and Load Balancer with K8s NodePort

Creating a Kubernetes Ingress and Load Balancer

Ingress controllers abstract the complexity of routed Kubernetes application traffic, providing a bridge between Kubernetes services and services that you define.

Creating Tenants, Hosts, and Services with EKS

See the Containers topic for steps on how to create Tenants, Hosts, and Services.

Once your service is deployed, you are ready to add and configure Kubernetes Ingress by enabling the AWS Application Load Balancer.

Enabling the AWS Application Load Balancer

Your administrator needs to enable the AWS Application Load Balancer controller for your infrastructure before you can use Ingress.

  1. In the DuploCloud Portal, navigate to Administrator -> Infrastructure and select the Infrastructure name from the NAME column. Select the Settings tab.

  2. Click Add. The Infra - Custom Data pane displays.

  3. From the Setting Name list box, select Enable ALB Ingress Controller.

  4. Select Enable.

  5. Click Set. In the Settings tab, the Enable ALB Ingress Controller setting displays a Value of true.

Adding a Load Balancer with Kubernetes NodePort

Add a load balancer listener that uses Kubernetes (K8s) NodePort. Kubernetes Health Check and Probes are enabled by default. To specifically configure the settings for Health Check, select Additional Health Check configs when you add the Load Balancer.

  1. In the DuploCloud Portal, navigate Kubernetes -> Services.

  2. On the Services page, select the Service name in the Name column.

  3. Click the Load Balancers tab.

  4. Click Configure Load Balancer. The Add Load Balancer Listener pane appears.

  5. In the Select Type field, select K8S Node Port.

  6. Complete the other required fields in the Add Load Balancer Listener pane and click Add. The Load Balancer displays in the Load Balancers tab.

Add Kubernetes Ingress

Once Services are deployed, add Ingress:

  1. Select Kubernetes -> Ingress from the navigation pane.

  2. Click Add. The Add Kubernetes Ingress page displays.

You must define rules to add a Kuberenetes Ingress. Continue to the next section to add rules to Kubernetes Ingress and complete the Ingress setup.

Configure Ingress with redirect config and annotations

  1. In the Add Kubernetes Ingress page, configure Ingress by clicking Add Rule. The Add or Edit Ingress Rule pane displays.

  1. Specify the Path (/ in the example above).

  2. To use a container port name (optional), use the toggle switch to enable Use Container Port Name.

  3. If you enabled Use Container Port Name in step 3., type a Service name in the Service Name field (redirect:use-annotation in the example) and a container port name in the Container Port field (use-annotation in the example).

  4. If you did not enable Use Container Port Name in step 3., from the Service Name list box, select the Service exposed through the K8S Node Port. The Container Port field is completed automatically.

  5. Click Add Rule. The rule is displayed on the Add Kubernetes Ingress page. Add additional rules by repeating the preceding steps.

  6. On the Add Kubernetes Ingress page, specify the Ingress Name.

  7. From the Ingress Controller list box, select the Ingress Controller that you defined previously.

  8. From the Visibility list box, select either Internal Only or Public.

  9. From the Certificate ARN list box, select the appropriate ARN.

  10. Click Add Redirect Config. The Add Redirect Config pane displays.

  11. Fill the fields as shown in the example above.

  12. Click Add to add the Kubernetes Ingress with defined rules. The Ingress you added displays in the K8S Ingress tab.

DuploCloud Platform supports defining multiple paths in Ingress. For example, you could define an Ingress rule with an Exact Path Type to route requests to /path1/for js-service1, add a rule with a Prefix Path Type to route requests to /path2/ for testsvc2. Additionally, you could add a rule with a Prefix Path Type to route requests via a BYOH Host (Bring-Your-Own-Host) named example.com, for a third service, testsvc3.

Viewing Ingress

When Ingress is configured, you can access Services based on the rules for each DNS, displayed on the Kubernetes -> Ingress page.

In this example, we display the output for three services with Path Type rules and different DNS names. See the previous example for detailed steps to create Ingress rules.

By executing curl commands, you can see the difference in the output for each service in this example. Configured services are accessed based on the DNS name specified in the DuploCloud Portal and the paths that you specified when you added Ingress rules.

>curl http://ig-nev-ingress-ing-t2-1-duplopoc.net/path-x/ this is service1 >curl http://ing-doc-ingress-ing-t2-1-duplopoc.net/path-y/ this is service2

>curl http://ing-public-ingress-ing-t2.1.duplopoc.net/path-z/

this is ING2-PUBLIC

Last updated


© DuploCloud, Inc. All rights reserved. DuploCloud trademarks used herein are registered trademarks of DuploCloud and affiliates