Skip to main content

MarkLogic Server on Kubernetes

Set up and use path-based routing with MarkLogic Helm Chart

Helm Chart release 2.0.0 includes the ability to setup and use path-based routing to access a MarkLogic cluster. This include the capability to use Ingress.

Limitations

Path-based routing and Ingress features are only supported on MarkLogic 11.1 and higher.

Prerequisites

The HAProxy LoadBalancer needs to be enabled to use path base routing and Ingress See Section HAProxy LoadBalancer.

Path bath routing configuration
Enable path-based routing

Path- based routing is disabled by default. To enable it, use this configuration in the values.yaml file for the chart installation:

pathbased:
  enabled: true
Front-end port configuration

Configure the front-end port to expose the HAProxy in the values.yaml file using this code:

frontendPort: 443
Default App Server path and back-end port

Configure the path and back-end port for the default App Servers in the chart installation values.yaml file:

defaultAppServers:
  appservices:
    path: /console
    port: 8000
  admin:
    path: /adminUI
    port: 8001
  manage:
    path: /manage
    port: 8002
Additional App Server

Include additional App Servers in the HAProxy configuration using the values.yaml file:

additionalAppServers:   
  - name: dhf-jobs
    type: HTTP
    port: 8010
    targetPort: 8010
    path: /DHF-jobs
  - name: dhf-final
    type: HTTP
    port: 8011
    targetPort: 8011
    path: /DHF-final
Ingress configuration
Enable Ingress

Ingress routing is disabled by default. To enable it, use this configuration in the values.yaml file:

ingress:
  enabled: false
Paths and ports configuration

The paths and ports only need to be configured in the HAProxy. The Ingress will automatically adapt its configuration to use what is defined there.

Ingress Class

Ingresses can be implemented by different controllers with different configurations. Each Ingress should specify a class in the values.yaml file.  In this example, the AWS ALB Ingress Controller is specified.

className: "alb"
Annotations

Some Ingress controllers require specific annotations. This example shows a configuration for an ALB Ingress Controller on AWS. See HTTP connection through Ingress on an EKS cluster for additional information.

annotations:
    alb.ingress.kubernetes.io/healthcheck-port: '443'
    alb.ingress.kubernetes.io/healthcheck-path: /adminUI
    alb.ingress.kubernetes.io/success-codes: '200-401'
    alb.ingress.kubernetes.io/load-balancer-name: ml
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
    alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests
    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:XXXXXXXXXXX:certificate/XxXXXXXX-xxxx-XXXX-XXXX-XXXXXXXxxxxXXX
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/group.name: ml-group
    alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600,routing.http.xff_header_processing.mode=append

 

Access MarkLogic Cluster

After path-based routing is configured, access the UI using these addresses:

Component

URL

QConsole

https://example.com/qconsole/console

Admin UI

https://example.com/adminUI/

Manage UI

https://example.com/manage/dashboard