Links
Comment on page

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. 1.
    In the DuploCloud Portal, navigate to Administrator > Infrastructure > Infrastructure_name > Settings.
  2. 2.
    Click Add. The Infra - Custom Data pane displays.
  3. 3.
    From the Setting Name list box, select Enable ALB Ingress Controller.
  4. 4.
    Select Enable.
  5. 5.
    Click Set. In the Settings tab, the Enable ALB Ingress Controller setting displays a Value of true.
Settings tab on the Infrastructure page

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. 1.
    In the DuploCloud Portal, navigate DevOps -> Containers -> EKS/Native.
  2. 2.
    On the Services page, select the Service name in the Name column.
  3. 3.
    Click the Load Balancers tab.
  4. 4.
    Click Configure Load Balancer. The Add Load Balancer Listener pane appears.
    Add Load Balancer LIstener pane
  5. 5.
    In the Select Type field, select K8S Node Port.
  6. 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.
Load Balancers tab for js-service1

Add Kubernetes Ingress

Once Services are deployed, add Ingress:
  1. 1.
    Select DevOps -> Containers -> EKS/Native from the navigation pane.
  2. 2.
    From the Name column on the Services page, select the Service to which you want to add Ingress.
  3. 3.
    Click the K8S Ingress tab.
  4. 4.
    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.
Add Kubernetes Ingress page with highlighted Add Rule option

Add rules to Kubernetes Ingress and complete Ingress setup

  1. 1.
    In the Add Kubernetes Ingress page, configure Ingress by clicking Add Rule. The Add Ingress Rule pane displays.
    Add Ingress Rule pane
  2. 2.
    Specify the Path (/path1/ in the example above).
  3. 3.
    From the Service Name list box, select the Service exposed through the K8S Node Port (js-service1 in the example above). The Container port field is completed automatically.
  4. 4.
    Optionally, complete Path Type and Host. In this example, we specify a Path Type of Exact. Clicking the Info Tip icon (
    ) provides more information for these optional fields.
  5. 5.
    Click Add Rule. The rule is displayed on the Add Kubernetes Ingress page. Add additional rules by repeating the preceding steps.
    Add Kubernetes Ingress page with added rule for /Path1/
  6. 6.
    On the Add Kubernetes Ingress page, specify the Ingress Name.
  7. 7.
    From the Ingress Controller list box, select the Ingress Controller that you defined previously.
  8. 8.
    From the Visibility list box, select either Internal Only or Public.
  9. 9.
    From the Certificate ARN list box, select the appropriate ARN.
  10. 10.
    Click Add to add the Kubernetes Ingress with defined rules. The Ingress you added displays in the K8S Ingress tab.
    K8S Ingress tab displaying added Ingress
  11. 11.
    DuploCloud Platform supports defining multiple paths in Ingress. We defined an Ingress rule with an Exact Path Type to route requests to /path1/for js-service1. To continue this example, we added a rule with a Prefix Path Type to route requests to /path2/ for testsvc2. Additionally, we added 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.
    Multiple paths defined for an Ingress in the DuploCloud Portal

Viewing Ingress

When Ingress is configured, you can access Services based on the rules for each DNS, displayed in the K8S Ingress tab.
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.
K8s Ingress Tab with multiple Ingresses for specific DNS names.
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