diff --git a/pages/clustering/high-availability/setup-ha-cluster-k8s.mdx b/pages/clustering/high-availability/setup-ha-cluster-k8s.mdx index 5f2c91cd0..222638fcd 100644 --- a/pages/clustering/high-availability/setup-ha-cluster-k8s.mdx +++ b/pages/clustering/high-availability/setup-ha-cluster-k8s.mdx @@ -272,6 +272,45 @@ Envoy Gateway controller with Memgraph HA cluster, see [Use Memgraph HA chart wi By default, the chart does **not** expose any external network services. +{

Per-instance external access annotations

} + +When using `LoadBalancer` or `NodePort` external access, you can set annotations +globally via `externalAccessConfig.dataInstance.annotations` and +`externalAccessConfig.coordinator.annotations`. These apply to every external +Service of that type. + +If you need different annotations per instance — for example, to assign unique +DNS hostnames via `external-dns` — use the `externalAccessAnnotations` field on +individual entries in `data[]` or `coordinators[]`. Per-instance annotations are +merged with the global annotations, and **per-instance values take precedence** +when the same key appears in both. + +```yaml +externalAccessConfig: + dataInstance: + serviceType: "LoadBalancer" + annotations: + service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing" + +data: + - id: "0" + externalAccessAnnotations: + external-dns.alpha.kubernetes.io/hostname: "data-0.memgraph.example.com" + args: + - "--management-port=10000" + - "--bolt-port=7687" + - id: "1" + externalAccessAnnotations: + external-dns.alpha.kubernetes.io/hostname: "data-1.memgraph.example.com" + args: + - "--management-port=10000" + - "--bolt-port=7687" +``` + +In this example, each data instance's external Service gets the shared +`aws-load-balancer-scheme` annotation plus its own unique `external-dns` +hostname. + ### Node affinity Memgraph HA deploys multiple pods, and you can control pod placement with @@ -962,6 +1001,7 @@ following parameters: | Parameter | Description | Default | |---------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------| | `id` | ID of the instance | `0` for data, `1` for coordinators | +| `externalAccessAnnotations` | Per-instance annotations for the external access Service, merged with global annotations. | `{}` | | `args` | List of arguments for the instance | See `args` section | The `args` section contains a list of arguments for the instance.