Upgrade on kind
View as MarkdownTo upgrade your Materialize instances, first choose a new operator version and upgrade the Materialize operator. Then, upgrade your Materialize instances to the same version. The following tutorial upgrades your Materialize deployment running locally on a kind
cluster.
The tutorial assumes you have installed Materialize on kind using the
instructions on Install locally on
kind.
Prerequisites
Helm 3.2.0+
If you don’t have Helm version 3.2.0+ installed, install. For details, see the Helm documentation.
kubectl
This tutorial uses kubectl. To install, refer to the kubectl
documentation.
For help with kubectl commands, see kubectl Quick
reference.
License key
Starting in v26.0, Materialize requires a license key. If your existing deployment does not have a license key configured, contact Materialize support.Upgrade
-
Open a Terminal window.
-
Go to your Materialize working directory.
cd my-local-mz -
Upgrade the Materialize Helm chart.
helm repo update materialize -
Get the sample configuration files for the new version.
mz_version=v26.31.0 curl -o upgrade-values.yaml https://raw.githubusercontent.com/MaterializeInc/materialize/refs/tags/$mz_version/misc/helm-charts/operator/values.yamlIf you have previously modified the
sample-values.yamlfile for your deployment, include the changes into theupgrade-values.yamlfile. -
Check the CRD version (
v1alpha1or, available starting in Materialize v26.30,v1) being used for your Materialize instance.To determine which CRD version is in use, run the following command, replacing
with your instance name. For the sample-materialize.yamlused in this example, the instance name is12345678-1234-1234-1234-123456789012:kubectl get materialize <instance-name> -n materialize-environment \ -o jsonpath='{.metadata.annotations.kubectl\.kubernetes\.io/last-applied-configuration}' \ | python3 -c 'import sys,json; print(json.load(sys.stdin)["apiVersion"])' -
Upgrade the Materialize Operator, specifying the new version and the updated configuration file. Include any additional configurations that you specify for your deployment.
Select the tab for your Materialize CRD API version (
v1alpha1or, available starting in Materialize v26.30,v1) your deployment currently uses. This step does not cover migrating fromv1alpha1tov1(including setting up prerequisites).If currently using
v1(available starting in Materialize v26.30):helm upgrade my-materialize-operator materialize/materialize-operator \ --namespace=materialize \ --version v26.31.0 \ -f upgrade-values.yaml \ --set observability.podMetrics.enabled=true \ --set operator.args.installV1CRD=trueIf currently using
v1alpha1(default):helm upgrade my-materialize-operator materialize/materialize-operator \ --namespace=materialize \ --version v26.31.0 \ -f upgrade-values.yaml \ --set observability.podMetrics.enabled=true -
Verify that the operator is running:
kubectl -n materialize get allVerify the operator upgrade by checking its events:
kubectl -n materialize describe pod -l app.kubernetes.io/name=materialize-operator -
As of v26.0, Self-Managed Materialize requires a license key. If your deployment has not been configured with a license key:
a. Contact Materialize support.
b. Once you have your license key, run the following command to add it to the
materialize-backendsecret:kubectl -n materialize-environment patch secret materialize-backend -p '{"stringData":{"license_key":"<your license key goes here>"}}' --type=merge -
Create a new
upgrade-materialize.yamlfile, updating the following fields:Select the tab for the CRD API version your deployment currently uses. This step does not cover migrating from
v1alpha1tov1. (Thev1CRD API version is available starting in Materialize v26.30.)If using
v1, update the following fields:Field Description environmentdImageRefUpdate the version to the new version. This should be the same as the operator version: v26.31.0. Updating this field automatically triggers a rollout.forceRolloutOptional. Set to a new UUID (can be generated with uuidgen) only to force a rollout when no other changes exist.apiVersion: materialize.cloud/v1 kind: Materialize metadata: name: 12345678-1234-1234-1234-123456789012 namespace: materialize-environment spec: environmentdImageRef: materialize/environmentd:v26.31.0 # Update version # forceRollout: 33333333-3333-3333-3333-333333333333 # For forced rollouts rolloutStrategy: WaitUntilReady # The mechanism to use when rolling out the new version. backendSecretName: materialize-backendv1alpha1is the default CRD version for a Materialize instance. Withv1alpha1, instance rollouts require manually rotating a UUID.If using
v1alpha1, update the following fields:Field Description environmentdImageRefUpdate the version to the new version. This should be the same as the operator version: v26.31.0.requestRolloutorforceRolloutEnter a new UUID. Can be generated with uuidgen.
requestRollouttriggers a rollout only if changes exist.forceRollouttriggers a rollout even if no changes exist.
apiVersion: materialize.cloud/v1alpha1 kind: Materialize metadata: name: 12345678-1234-1234-1234-123456789012 namespace: materialize-environment spec: environmentdImageRef: materialize/environmentd:v26.31.0 # Update version requestRollout: 22222222-2222-2222-2222-222222222222 # Enter a new UUID # forceRollout: 33333333-3333-3333-3333-333333333333 # For forced rollouts rolloutStrategy: WaitUntilReady # The mechanism to use when rolling out the new version. backendSecretName: materialize-backend -
Apply the upgrade-materialize.yaml file to your Materialize instance:
kubectl apply -f upgrade-materialize.yaml -
Verify that the components are running after the upgrade:
kubectl -n materialize-environment get allVerify upgrade by checking the
balancerdevents:kubectl -n materialize-environment describe pod -l app=balancerdThe Events section should list that the new version of the
balancerdhave been pulled.Verify the upgrade by checking the
environmentdevents:kubectl -n materialize-environment describe pod -l app=environmentdThe Events section should list that the new version of the
environmentdhave been pulled. -
Open the Materialize Console. The Console should display the new version.