Skip to content

Commit e3a49c4

Browse files
committed
update upgrade docs for v26
1 parent 649af6e commit e3a49c4

File tree

1 file changed

+78
-61
lines changed

1 file changed

+78
-61
lines changed

doc/user/content/installation/upgrading.md

Lines changed: 78 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
---
2-
title: "Upgrading"
3-
description: "Upgrading Helm chart and Materialize."
2+
title: "Upgrade Overview"
3+
description: "Upgrading Self-Managed Materialize."
44
menu:
55
main:
66
parent: "installation"
7-
draft: true
87
---
98

10-
The following provides steps for upgrading the Materialize operator and
11-
Materialize instances. While the operator and instances can be upgraded
12-
independently, you should ensure version compatibility between them.
9+
The following provides a general outline and examples for upgrading Materialize.
1310

14-
When upgrading:
11+
For a more specific set of steps, please consult the deployment-specific upgrade
12+
documentation:
13+
- [Minikube](/installation/install-on-local-minikube/upgrade-on-local-minikube/)
14+
- [Kind](/installation/install-on-local-kind/upgrade-on-local-kind/)
15+
- [AWS](/installation/install-on-aws/upgrade-on-aws/)
16+
- [GCP](/installation/install-on-gcp/upgrade-on-gcp/)
17+
- [Azure](/installation/install-on-azure/upgrade-on-azure/)
1518

16-
- Ensure version compatibility between the Materialize operator and Materialize
17-
instance. The operator can manage instances within a certain version range
18-
version range.
19+
***When upgrading always***:
20+
- Upgrade the operator first and ensure version compatibility between the operator and the Materialize instance you are upgrading to.
21+
- Upgrade your Materialize instances after upgrading the operator to ensure compatibility.
22+
- Check the [version specific upgrade notes](#version-specific-upgrade-notes).
1923

20-
- Upgrade the operator first.
21-
22-
- Always upgrade your Materialize instances after upgrading the operator to
23-
ensure compatibility.
24-
25-
### Upgrading the Helm Chart
24+
### Upgrading the Helm Chart and Kubernetes Operator
2625

2726
{{< important >}}
2827

29-
Upgrade the operator first.
28+
When upgrading Materialize, always upgrade the operator first.
3029

3130
{{</ important >}}
3231

33-
To upgrade the Materialize operator to a new version:
32+
The Materialize Kubernetes operator is deployed via Helm and can be updated through standard Helm upgrade commands.
3433

3534
```shell
3635
helm upgrade my-materialize-operator materialize/misc/helm-charts/operator
@@ -44,62 +43,58 @@ helm upgrade my-materialize-operator materialize/misc/helm-charts/operator -f my
4443

4544
### Upgrading Materialize Instances
4645

47-
{{< important >}}
48-
49-
Always upgrade your Materialize instances after upgrading the operator to
50-
ensure compatibility.
51-
52-
{{</ important >}}
53-
54-
To upgrade your Materialize instances, you'll need to update the Materialize custom resource and trigger a rollout.
46+
In order to minimize unexpected downtime and avoid connection drops at critical
47+
periods for your application, changes are not immediately and automatically
48+
rolled out by the Operator. Instead, the upgrade process involves two steps:
49+
- First, staging spec changes to the Materialize custom resource.
50+
- Second, applying the changes via a `rolloutRequest`.
5551

56-
By default, the operator performs rolling upgrades (`inPlaceRollout: false`) which minimize downtime but require additional Kubernetes cluster resources during the transition. However, keep in mind that rolling upgrades typically take longer to complete due to the sequential rollout process. For environments where downtime is acceptable, you can opt for in-place upgrades (`inPlaceRollout: true`).
52+
When upgrading your Materialize instances, you'll first want to update the `environmentdImageRef` field in the Materialize custom resource spec.
5753

58-
#### Determining the Version
59-
60-
The compatible version for your Materialize instances is specified in the Helm chart's `appVersion`. For the installed chart version, you can run:
54+
#### Updating the `environmentdImageRef`
55+
To find a compatible version with your currently deployed Materialize operator, check the `appVersion` in the Helm repository.
6156

6257
```shell
6358
helm list -n materialize
6459
```
6560

66-
Or check the `Chart.yaml` file in the `misc/helm-charts/operator` directory:
61+
Using the returned version, we can construct an image ref.
62+
We always recommend using the official Materialize image repository
63+
`docker.io/materialize/environmentd`.
6764

68-
```yaml
69-
apiVersion: v2
70-
name: materialize-operator
71-
# ...
72-
version: 25.1.0-beta.1
73-
appVersion: v0.125.2 # Use this version for your Materialize instances
65+
```
66+
environmentdImageRef: docker.io/materialize/environmentd:v26.0.0
7467
```
7568

76-
Use the `appVersion` (`v0.125.2` in this case) when updating your Materialize instances to ensure compatibility.
77-
78-
#### Using `kubectl` patch
79-
80-
For standard upgrades such as image updates:
81-
69+
The following is an example of how to patch the version.
8270
```shell
8371
# For version updates, first update the image reference
8472
kubectl patch materialize <instance-name> \
8573
-n <materialize-instance-namespace> \
8674
--type='merge' \
87-
-p "{\"spec\": {\"environmentdImageRef\": \"materialize/environmentd:v0.125.2\"}}"
75+
-p "{\"spec\": {\"environmentdImageRef\": \"materialize/environmentd:v26.0.0\"}}"
76+
```
8877

78+
#### Applying the changes via `rolloutRequest`
79+
80+
To apply changes and kick off the Materialize instance upgrade, you must update the `requestRollout` field in the Materialize custom resource spec to a new UUID.
81+
Be sure to consult the [Rollout Configurations](#rollout-configuration) to ensure you've selected the correct rollout behavior.
82+
```shell
8983
# Then trigger the rollout with a new UUID
9084
kubectl patch materialize <instance-name> \
9185
-n <materialize-instance-namespace> \
9286
--type='merge' \
9387
-p "{\"spec\": {\"requestRollout\": \"$(uuidgen)\"}}"
9488
```
9589

96-
You can combine both operations in a single command if preferred:
90+
91+
It is possible to combine both operations in a single command if preferred:
9792

9893
```shell
9994
kubectl patch materialize 12345678-1234-1234-1234-123456789012 \
10095
-n materialize-environment \
10196
--type='merge' \
102-
-p "{\"spec\": {\"environmentdImageRef\": \"materialize/environmentd:v0.125.2\", \"requestRollout\": \"$(uuidgen)\"}}"
97+
-p "{\"spec\": {\"environmentdImageRef\": \"materialize/environmentd:v26.0.0\", \"requestRollout\": \"$(uuidgen)\"}}"
10398
```
10499

105100
#### Using YAML Definition
@@ -113,10 +108,11 @@ metadata:
113108
name: 12345678-1234-1234-1234-123456789012
114109
namespace: materialize-environment
115110
spec:
116-
environmentdImageRef: materialize/environmentd:v0.125.2 # Update version as needed
111+
environmentdImageRef: materialize/environmentd:v26.0.0 # Update version as needed
117112
requestRollout: 22222222-2222-2222-2222-222222222222 # Generate new UUID
118113
forceRollout: 33333333-3333-3333-3333-333333333333 # Optional: for forced rollouts
119-
inPlaceRollout: false # When false, performs a rolling upgrade rather than in-place
114+
inPlaceRollout: false # In Place rollout is deprecated and ignored. Please use rolloutStrategy
115+
rolloutStrategy: WaitUntilReady # The mechanism to use when rolling out the new version. Can be WaitUntilReady or ImmediatelyPromoteCausingDowntime
120116
backendSecretName: materialize-backend
121117
```
122118
@@ -126,6 +122,8 @@ Apply the updated definition:
126122
kubectl apply -f materialize.yaml
127123
```
128124

125+
### Rollout Configuration
126+
129127
#### Forced Rollouts
130128

131129
If you need to force a rollout even when there are no changes to the instance:
@@ -137,13 +135,25 @@ kubectl patch materialize <instance-name> \
137135
-p "{\"spec\": {\"requestRollout\": \"$(uuidgen)\", \"forceRollout\": \"$(uuidgen)\"}}"
138136
```
139137

140-
The behavior of a forced rollout follows your `inPlaceRollout` setting:
141-
- With `inPlaceRollout: false` (default): Creates new instances before terminating the old ones, temporarily requiring twice the resources during the transition
142-
- With `inPlaceRollout: true`: Directly replaces the instances, causing downtime but without requiring additional resources
138+
#### Rollout Strategies
139+
The behavior of the new version rollout follows your `rolloutStrategy` setting:
140+
141+
`WaitUntilReady` (default):
142+
143+
New instances are created and all dataflows are determined to be ready before cutover and terminating the old version, temporarily requiring twice the resources during the transition.
144+
145+
`ImmediatelyPromoteCausingDowntime`:
146+
147+
Tears down the prior version before creating and promoting the new version. This causes downtime equal to the duration it takes for dataflows to hydrate, but does not require additional resources.
148+
149+
#### In Place Rollout
150+
151+
`inPlaceRollout` has been deprecated and will be ignored.
152+
143153

144154
### Verifying the Upgrade
145155

146-
After initiating the rollout, you can monitor the status:
156+
After initiating the rollout, you can monitor the status field of the Materialize custom resource to check on the upgrade.
147157

148158
```shell
149159
# Watch the status of your Materialize environment
@@ -152,15 +162,22 @@ kubectl get materialize -n materialize-environment -w
152162
# Check the logs of the operator
153163
kubectl logs -l app.kubernetes.io/name=materialize-operator -n materialize
154164
```
155-
156-
### Notes on Rollouts
157-
158-
- `requestRollout` triggers a rollout only if there are actual changes to the instance (like image updates)
159-
- `forceRollout` triggers a rollout regardless of whether there are changes, which can be useful for debugging or when you need to force a rollout for other reasons
160-
- Both fields expect UUID values and each rollout requires a new, unique UUID value
161-
- `inPlaceRollout`:
162-
- When `false` (default): Performs a rolling upgrade by spawning new instances before terminating old ones. While this minimizes downtime, there may still be a brief interruption during the transition.
163-
- When `true`: Directly replaces existing instances, which will cause downtime.
165+
### Version Specific Upgrade Notes
166+
167+
#### Upgrading to `v26.0`
168+
- This is a major version upgrade. In order to upgrade to `v26.0`, you must first upgrade to `v25.2.15`, then upgrade to `v26.0.0`.
169+
- New requirements were introduced for license keys. In order to upgrade, you will
170+
first need to add a license key to the `backendSecret` used in the spec for your
171+
Materialize resource. Please refer to our [instructions on how to get and install a license keys](/installation/faq#how-do-i-get-a-license-key).
172+
- Swap is now enabled by default. Swap reduces the memory required to
173+
operate Materialize and improves cost efficiency. Upgrading to `v26.0`
174+
requires some preparation to ensure kubernetes nodes are labeled
175+
and configured correctly. Please refer to our guide on [swap node
176+
preparation](/installation/upgrade-to-swap).
177+
178+
179+
#### Upgrading between minor versions less than `v26`
180+
- Prior to `v26`, you must upgrade at most one minor version at a time. For example, upgrading from `v25.1.5` to `v25.2.15` is permitted.
164181

165182
## See also
166183

0 commit comments

Comments
 (0)