Install locally on minikube

Self-managed Materialize requires:

  • A Kubernetes (v1.29+) cluster.
  • PostgreSQL as a metadata database.
  • Blob storage.

The following tutorial deploys the following components onto your local minikube:

  • Materialize Operator using Helm into your local minikube cluster.
  • MinIO object storage as the blob storage for your Materialize.
  • PostgreSQL database as the metadata database for your Materialize.
  • Materialize as a containerized application into your local minikube cluster.
! Important: For testing purposes only.

Prerequisites

minikube

Install minikube.

Container or virtual machine manager

The following tutorial uses Docker as the container or virtual machine manager. To use another container or virtual machine manager as listed on the minikube documentation, refer to the specific container/VM manager documentation.

Install Docker.

Resource requirements

For this local deployment, you will need:

  • 3 CPUs
  • 20GB memory

Helm 3.2.0+

If you don’t have Helm version 3.2.0+ installed, refer to the Helm documentation.

kubectl

This tutorial uses kubectl. To install, refer to the kubectl documentationq.

For help with kubectl commands, see kubectl Quick reference.

Sample configuration files

Download the following sample configuration files from the Materialize repo:

  • values.yaml
  • postgres.yaml
  • minio.yaml
  • materialize.yaml
curl -o values.yaml https://raw.githubusercontent.com/MaterializeInc/materialize/refs/heads/lts-v0.130/misc/helm-charts/operator/values.yaml
curl -o sample-postgres.yaml https://raw.githubusercontent.com/MaterializeInc/materialize/refs/heads/lts-v0.130/misc/helm-charts/testing/postgres.yaml
curl -o sample-minio.yaml https://raw.githubusercontent.com/MaterializeInc/materialize/refs/heads/lts-v0.130/misc/helm-charts/testing/minio.yaml
curl -o sample-materialize.yaml https://raw.githubusercontent.com/MaterializeInc/materialize/refs/heads/lts-v0.130/misc/helm-charts/testing/materialize.yaml

Installation

  1. Start Docker if it is not already running.

  2. Open a Terminal window.

  3. Create a minikube cluster.

    minikube start
    
  4. Install the Materialize Helm chart.

    1. Add the Materialize Helm chart repository.

      helm repo add materialize https://materializeinc.github.io/materialize
      helm repo update materialize
      
    2. Install the Materialize Operator.

      helm install my-materialize-operator materialize/materialize-operator \
          --namespace=materialize --create-namespace \
          --version v25.1.1 \
          --set operator.cloudProvider.region=minikube \
          -f values.yaml
      
    3. Verify the installation and check the status:

      kubectl get all -n materialize
      

      Wait for the components to be in the Running state:

      NAME                                           READY   STATUS    RESTARTS   AGE
      pod/my-materialize-operator-669d674ccf-h5842   1/1     Running   0          12m
      
      NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE
      deployment.apps/my-materialize-operator   1/1     1            1           12m
      
      NAME                                                 DESIRED   CURRENT         READY   AGE
      replicaset.apps/my-materialize-operator-669d674ccf   1         1               1       12m
      

      If you run into an error during deployment, refer to the Troubleshooting guide.

  5. Install PostgreSQL and minIO.

    1. Use the sample-postgres.yaml file to install PostgreSQL as the metadata database:

      kubectl apply -f sample-postgres.yaml
      
    2. Use the sample-minio.yaml file to install minIO as the blob storage:

      kubectl apply -f sample-minio.yaml
      
  6. Optional. Install the following metrics service for certain system metrics but not required.

    kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
    
  7. Install Materialize into a new materialize-environment namespace:

    1. Use the sample-materialize.yaml file to create the materialize-environment namespace and install Materialize:

      kubectl apply -f sample-materialize.yaml
      
    2. Verify the installation and check the status:

      kubectl get all -n materialize-environment
      

      Wait for the components to be in the Running state.

      NAME                                             READY   STATUS      RESTARTS   AGE
      pod/mzk7x050omzi-balancerd-5b99dff555-7qltf      1/1     Running     0          19s
      pod/mzk7x050omzi-cluster-s1-replica-s1-gen-1-0   1/1     Running     0          22s
      pod/mzk7x050omzi-cluster-s2-replica-s2-gen-1-0   1/1     Running     0          22s
      pod/mzk7x050omzi-cluster-s3-replica-s3-gen-1-0   1/1     Running     0          22s
      pod/mzk7x050omzi-cluster-u1-replica-u1-gen-1-0   1/1     Running     0          22s
      pod/mzk7x050omzi-console-8c45c4b95-8ng29         1/1     Running     0          12s
      pod/mzk7x050omzi-console-8c45c4b95-jwj6c         1/1     Running     0          12s
      pod/mzk7x050omzi-environmentd-1-0                1/1     Running     0          36s
      
      NAME                                               TYPE          CLUSTER-IP   EXTERNAL-IP   PORT(S)                                          AGE
      service/mzk7x050omzi-balancerd                     ClusterIP     None         <none>        6876/TCP,6875/TCP                                19s
      service/mzk7x050omzi-cluster-s1-replica-s1-gen-1   ClusterIP     None         <none>        2100/TCP,2103/TCP,2101/TCP,2102/TCP,6878/TCP     22s
      service/mzk7x050omzi-cluster-s2-replica-s2-gen-1   ClusterIP     None         <none>        2100/TCP,2103/TCP,2101/TCP,2102/TCP,6878/TCP     22s
      service/mzk7x050omzi-cluster-s3-replica-s3-gen-1   ClusterIP     None         <none>        2100/TCP,2103/TCP,2101/TCP,2102/TCP,6878/TCP     22s
      service/mzk7x050omzi-cluster-u1-replica-u1-gen-1   ClusterIP     None         <none>        2100/TCP,2103/TCP,2101/TCP,2102/TCP,6878/TCP     22s
      service/mzk7x050omzi-console                       ClusterIP     None         <none>        8080/TCP                                         12s
      service/mzk7x050omzi-environmentd                  ClusterIP     None         <none>        6875/TCP,6876/TCP,6877/TCP,6878/TCP              19s
      service/mzk7x050omzi-environmentd-1                ClusterIP     None         <none>        6875/TCP,6876/TCP,6877/TCP,6878/TCP              36s
      service/mzk7x050omzi-persist-pubsub-1              ClusterIP     None         <none>        6879/TCP                                         36s
      
      NAME                                     READY   UP-TO-DATE   AVAILABLE     AGE
      deployment.apps/mzk7x050omzi-balancerd   1/1     1            1             19s
      deployment.apps/mzk7x050omzi-console     2/2     2            2             12s
      
      NAME                                                DESIRED   CURRENT     READY   AGE
      replicaset.apps/mzk7x050omzi-balancerd-5b99dff555   1         1           1       19s
      replicaset.apps/mzk7x050omzi-console-8c45c4b95      2         2           2       12s
      
      NAME                                                        READY   AGE
      statefulset.apps/mzk7x050omzi-cluster-s1-replica-s1-gen-1   1/1     22s
      statefulset.apps/mzk7x050omzi-cluster-s2-replica-s2-gen-1   1/1     22s
      statefulset.apps/mzk7x050omzi-cluster-s3-replica-s3-gen-1   1/1     22s
      statefulset.apps/mzk7x050omzi-cluster-u1-replica-u1-gen-1   1/1     22s
      statefulset.apps/mzk7x050omzi-environmentd-1                1/1     36s
      

      If you run into an error during deployment, refer to the Troubleshooting guide.

  8. Open the Materialize console in your browser:

    1. From the previous kubectl output, find the Materialize console service.

      NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)       AGE
      service/mzk7x050omzi-console    ClusterIP   None           <none>        8080/TCP      12s
      
    2. Forward the Materialize console service to your local machine:

      while true;
      do kubectl port-forward svc/mzlvmx9h6dpx-console 8080:8080 -n materialize-environment 2>&1 |
      grep -q "portforward.go" && echo "Restarting port forwarding due to an error." || break;
      done;
      
      NOTE: Due to a known Kubernetes issue, interrupted long-running requests through a standard port-forward cause the port forward to hang. The command above automatically restarts the port forwarding if an error occurs, ensuring a more stable connection. It detects failures by monitoring for "portforward.go" error messages.
    3. Open a browser to http://localhost:8080.

      Image of self-managed Materialize console running on local minikube

See also

Back to top ↑