doc/user/content/self-managed-deployments/upgrading/upgrade-on-gcp.md
The following tutorial upgrades your Materialize deployment running on Google Kubernetes Engine (GKE). The tutorial assumes you have installed the example on Install on GCP.
{{% include-from-yaml data="self_managed/upgrades" name="upgrades-general-rules" %}}
{{< note >}} {{< include-from-yaml data="self_managed/upgrades" name="upgrade-major-version-restriction" >}} {{< /note >}}
{{< note >}} {{< include-from-yaml data="self_managed/upgrades" name="downgrade-restriction" >}} {{< /note >}}
{{< important >}}
The following procedure performs a rolling upgrade, where both the old and new Materialize instances are running before the old instances are removed. When performing a rolling upgrade, ensure you have enough resources to support having both the old and new Materialize instances running.
{{</ important >}}
Open a Terminal window.
Configure Google Cloud CLI with your GCP credentials. For details, see the Google Cloud documentation.
Go to the Terraform directory for your Materialize deployment. For example,
if you deployed from the gcp/examples/simple directory:
cd materialize-terraform-self-managed/gcp/examples/simple
Configure kubectl to connect to your GKE cluster, replacing:
<your-gke-cluster-name> with your cluster name; i.e., the
gke_cluster_name in the Terraform output. For the sample example, your
cluster name has the form <name_prefix>-gke; e.g., simple-demo-gke
<your-region> with your cluster location; i.e., the
gke_cluster_location in the Terraform output. Your
region can also be found in your terraform.tfvars file.
<your-project-id> with your GCP project ID.
# gcloud container clusters get-credentials <your-gke-cluster-name> --region <your-region> --project <your-project-id>
gcloud container clusters get-credentials $(terraform output -raw gke_cluster_name) \
--region $(terraform output -raw gke_cluster_location) \
--project <your-project-id>
To verify that you have configured correctly, run the following command:
kubectl get nodes
For help with kubectl commands, see kubectl Quick reference.
{{< important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-order-rule" %}}
{{</ important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-update-helm-chart" %}}
{{< important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-order-rule" %}}
{{</ important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-materialize-operator" %}}
{{< important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-order-rule" %}}
{{</ important >}}
{{% include-from-yaml data="self_managed/upgrades" name="upgrade-materialize-instance" %}}