Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3058,6 +3058,11 @@ export default withNextra({
destination: '/clustering/high-availability',
permanent: true
},
{
source: '/clustering/high-availability/setup-ha-cluster-k8s',
destination: '/clustering/high-availability/kubernetes/helm-chart',
permanent: true
},
{
source: '/configuration/logs',
destination: '/database-management/logs',
Expand Down
12 changes: 8 additions & 4 deletions pages/clustering/high-availability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ containers.
A guided walkthrough for deploying an HA cluster using Docker Compose for
simplified orchestration.

### [Set up an HA cluster using Kubernetes](/clustering/high-availability/setup-ha-cluster-k8s)
### [Set up an HA cluster using Kubernetes](/clustering/high-availability/kubernetes)

Learn how to deploy Memgraph HA on Kubernetes using Helm Charts, including
recommended configuration patterns.
Choose between the two ways to run Memgraph HA on Kubernetes: the [Memgraph HA
Helm chart](/clustering/high-availability/kubernetes/helm-chart) and its
successor, the [Memgraph Kubernetes
operator](/clustering/high-availability/kubernetes/operator). Try the operator
for your clusters: Memgraph plans to deprecate the Helm chart, after which the
chart receives only necessary and critical bug fixes.

## Operational guides

Expand Down Expand Up @@ -78,7 +82,7 @@ Plan Memgraph version upgrades, including standalone and HA clusters. Use the
[version-specific guides](/database-management/upgrades/specific-versions) when
moving between major releases.

### [In-service software upgrade (ISSU) on Kubernetes](/clustering/high-availability/setup-ha-cluster-k8s#in-service-software-upgrade-issu)
### [In-service software upgrade (ISSU) on Kubernetes](/clustering/high-availability/kubernetes/helm-chart#in-service-software-upgrade-issu)

For HA on Kubernetes, Memgraph supports rolling upgrades with minimal downtime
when you follow the ISSU procedure on the Helm chart setup page.
Expand Down
2 changes: 1 addition & 1 deletion pages/clustering/high-availability/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
"coordinator-authentication": "Coordinator authentication",
"setup-ha-cluster-docker": "Set up HA cluster with Docker",
"setup-ha-cluster-docker-compose": "Set up HA cluster with Docker Compose",
"setup-ha-cluster-k8s": "Set up HA cluster with K8s",
"kubernetes": "Memgraph HA in K8s",
"best-practices": "Best practices",
"analytical-import": "Bulk import in analytical mode",
"ha-commands-reference": "Reference commands",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ will keep failing after the initial install.
Until the chart supports SSO-authenticated setup, running SSO on coordinators in
Kubernetes requires manual intervention: disable the `cluster-setup` Job and
[set up the cluster
yourself](/clustering/high-availability/setup-ha-cluster-k8s#setting-up-the-cluster).
yourself](/clustering/high-availability/kubernetes/helm-chart#setting-up-the-cluster).
Register the coordinators and data instances over an SSO-authenticated
connection that holds `COORDINATOR_WRITE`, and apply membership changes on
`helm upgrade` the same way. This flow will be improved in an upcoming release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ and data loss, instances are upgraded in a fixed order:

For the full step-by-step procedure, including backups and Helm chart
configuration, see the [ISSU section on the Kubernetes setup
page](/clustering/high-availability/setup-ha-cluster-k8s#in-service-software-upgrade-issu).
page](/clustering/high-availability/kubernetes/helm-chart#in-service-software-upgrade-issu).
The same flow applies to native deployments.


Expand Down
66 changes: 66 additions & 0 deletions pages/clustering/high-availability/kubernetes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Memgraph HA in Kubernetes
description: Choose between the memgraph-high-availability Helm chart and the Memgraph Kubernetes operator to run a Memgraph high availability cluster on Kubernetes.
---

import { Callout } from 'nextra/components'

# Memgraph HA in Kubernetes <sup style={{ fontSize: '0.6em', color: '#888' }}>Enterprise</sup>

You can run a Memgraph [high availability](/clustering/high-availability)
cluster on Kubernetes in two ways: with the Memgraph Kubernetes operator, or
with the `memgraph-high-availability` Helm chart. Both run the same Memgraph
coordinators and data instances, and both need a [Memgraph Enterprise
license](/database-management/enabling-memgraph-enterprise).

- **[Memgraph Kubernetes
operator](/clustering/high-availability/kubernetes/operator)**: one
`MemgraphDBCluster` resource describes the cluster, and the operator creates
it, registers its members and keeps them registered. It also carries out
scaling, flag changes, storage growth and rolling restarts.
- **[Memgraph high availability Helm
chart](/clustering/high-availability/kubernetes/helm-chart)**: you list
every coordinator and data instance in the chart values, and a Job registers
them on every `helm install` and `helm upgrade`.

<Callout type="info">
The operator is the successor to the `memgraph-high-availability` chart, and
the recommended way to run a new cluster. Memgraph plans to deprecate the Helm
chart, after which the chart receives only necessary and critical bug fixes.
</Callout>

## Choose between the chart and the operator

| | Helm chart | Operator |
|---|---|---|
| How you describe the cluster | Helm values, one block per instance | One `MemgraphDBCluster` resource with a count per role |
| Workloads | One StatefulSet per instance | One StatefulSet per role |
| Registration | A Job, on every `helm install` and `helm upgrade` | The operator, continuously: a lost registration is restored without a `helm upgrade` |
| Scaling | Add or remove instance entries, then `helm upgrade` | Change a count; the operator moves the MAIN off a retiring instance first |
| Changing a flag | Flags are container arguments: every change restarts the pods | Edit `flags`. A flag Memgraph can change at run time is applied to every running instance with **no restart**; only startup-only flags restart pods |
| Coordinator settings | Run `SET COORDINATOR SETTING` yourself | Set them in `flags.coordinators`; the operator writes them once, with no restart |
| Renewing the license | Run `SET DATABASE SETTING` on every instance, then update the Secret | Update the Secret; the operator applies the new license to every instance, with no restart, and reports it in the `LicenseApplied` condition |
| Restarting pods | The StatefulSet `updateStrategy`; ISSU by hand with `OnDelete` | The operator, one pod at a time in the ISSU order: data instances first, the MAIN last, then coordinators with the leader last |
| Storage | Separate claims for data and logs, 1Gi by default | One claim per pod for data and logs (10Gi by default), or no log files at all (`logFile: None`); claims grow on a live cluster without a restart, and are kept on delete and scale-down by default |
| Probes | Startup, readiness and liveness probes; the startup probe must outlast the longest recovery | One readiness probe with three timings, and no liveness or startup probe, so a long recovery is never killed |
| Scheduling | Four affinity modes (`default`, `unique`, `parity`, `nodeSelection`) | One anti-affinity rule with `type`, `scope` and `topologyKey`, plus per-role node selectors, tolerations, topology spread constraints and priority classes |
| Security context | `memgraphUserId` and `memgraphGroupId` | `securityContext`, defaulting to the Memgraph image's user; `{}` lets the platform assign it, as OpenShift requires |
| External access | Five methods chosen per tier; addresses registered by the setup Job on `helm upgrade`, or with `UPDATE CONFIG` by hand | One `type` (`LoadBalancer` or `Gateway`); the operator finds each member's external address and keeps the routing table pointing at it as the address changes |
| Bolt authentication | Supported; you create users with Cypher | Not supported yet |

Start a new cluster with the operator, and check its
[limitations](/clustering/high-availability/kubernetes/operator#limitations)
for the chart features it doesn't have yet.

## Move from the chart to the operator

There is no migration path from the chart to the operator: no tool or hook
converts a chart-deployed cluster, and the operator never takes over one. To
move, create a new cluster with the operator and transfer the data to it, with a
[backup and restore](/database-management/backup-and-restore) or a replication
cutover.

Where a setting exists in both, the operator uses the chart's name for it. The
`secrets` block that names the license Secret, for example, is the same in
both. The topology is where they differ: the chart's per-instance blocks become
two counts, `coordinators` and `dataInstances`.
4 changes: 4 additions & 0 deletions pages/clustering/high-availability/kubernetes/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
"helm-chart": "Memgraph HA Helm chart",
"operator": "Memgraph K8s operator",
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
---
title: Setup high availability cluster with Kubernetes
description: See how one can setup a high availability cluster with Kubernetes.
title: Memgraph high availability Helm chart
description: Deploy and operate a Memgraph high availability cluster on Kubernetes with the memgraph-high-availability Helm chart.
---

import { Callout } from 'nextra/components'
import { Steps } from 'nextra/components'
import {CommunityLinks} from '/components/social-card/CommunityLinks'

# Set up HA cluster with K8s <sup style={{ fontSize: '0.6em', color: '#888' }}>Enterprise</sup>
# Memgraph high availability Helm chart <sup style={{ fontSize: '0.6em', color: '#888' }}>Enterprise</sup>

The `memgraph-high-availability` Helm chart deploys a Memgraph high
availability cluster on Kubernetes. Its successor is the [Memgraph Kubernetes
operator](/clustering/high-availability/kubernetes/operator). Try the operator
for your clusters: Memgraph plans to deprecate the Helm chart, after which the chart
receives only necessary and critical bug fixes. To compare the two, see
[Memgraph HA in Kubernetes](/clustering/high-availability/kubernetes).

<Callout>
Users are advised to first read the guide on [how replication
Expand Down
Loading
Loading