LogoLogo
CloudDiscordGitHub
  • 👉Getting Started
    • Introduction
    • Quick start
    • Learn by example
    • Case studies
    • How to contribute?
  • ⭐Memphis Broker
    • Architecture
    • Key concepts
      • Message broker
      • Station
      • Producer API
      • Consumer API
      • Consumer Group
      • Storage and Redundancy
      • Security/Authentication
      • Scaling
      • Ordering
      • Dead-letter Station (DLS)
      • Delayed messages
      • Data exchange
      • Idempotency (Duplicate processing)
      • Failover Scenarios
      • Troubleshooting process
      • Connectors
    • Best practices
      • Producer optimization
      • Compression
    • Memphis configuration
    • Comparisons
      • NATS Jetstream vs Memphis
      • RabbitMQ vs Memphis
      • AWS SQS vs Memphis
      • Apache Kafka vs Memphis
      • Apache Pulsar vs Memphis
      • ZeroMQ vs Memphis
      • Apache NiFi vs Memphis
    • Privacy Policy
  • ⭐Memphis Schemaverse
    • Overview
    • Getting started
      • Management
      • Produce/Consume
        • Protobuf
        • JSON Schema
        • GraphQL
        • Avro
    • Comparison
    • KB
  • 📦Open-Source Installation
    • Kubernetes
      • 1 - Installation
      • 2 - Access
      • 3 - Upgrade
      • Terraform
        • Deploy on AWS
        • Deploy on GCP
        • Deploy on DigitalOcean
      • Guides
        • Deploy/Upgrade Memphis utilizing predefined secrets
        • Monitoring/Alerts Recommendations
        • Production Best Practices
        • NGINX Ingress Controller and Cloud-Agnostic Memphis Deployments
        • Migrate Memphis storage between storageClass's
        • Expanding Memphis Disk Storage
        • Scale-out Memphis cluster
        • TLS - Deploy Memphis with TLS Connection to Metadata Frontend
        • TLS - Memphis TLS websocket configuration
        • TLS - Securing Memphis Client with TLS
        • Installing Memphis with an External Metadata Database
    • Docker
      • 1 - Installation
      • 2 - Access
      • 3 - Upgrade
    • Open-source Support
  • Client Libraries
    • REST (Webhook)
    • Node.js / TypeScript / NestJS
    • Go
    • Python
    • Kotlin (Community)
    • .NET
    • Java
    • Rust (Community)
    • NATS
    • Scala
  • 🔌Integrations Center
    • Index
    • Processing
      • Zapier
    • Change data Capture (CDC)
      • Debezium
    • Monitoring
      • Datadog
      • Grafana
    • Notifications
      • Slack
    • Storage tiering
      • S3-Compatible Object Storage
    • Source code
      • GitHub
    • Other platforms
      • Argo
  • 🗒️Release notes
    • KB
    • Releases
      • v1.4.3 - latest/stable
      • v1.4.2
      • v1.4.1
      • v1.4.0
      • v1.3.1
      • v1.3.0
      • v1.2.0
      • v1.1.1
      • v1.1.0
      • v1.0.3
      • v1.0.2
      • v1.0.1
      • V1.0.0 - GA
      • v0.4.5 - beta
      • v0.4.4 - beta
      • v0.4.3 - beta
      • v0.4.2 - beta
      • v0.4.1 - beta
      • v0.4.0 - beta
      • v0.3.6 - beta
      • v0.3.5 - beta
      • v0.3.0 - beta
      • v0.2.2 - beta
      • v0.2.1 - beta
      • v0.2.0 - beta
      • v0.1.0 - beta
Powered by GitBook
LogoLogo

Legal

  • Terms of Service
  • Privacy Policy

All rights reserved to Memphis.dev 2023

On this page
  • Step 1: Deploy the new Memphis version
  • Step 2: Create a second connection for the consumers
  • Step 3: Shift producers to the newer version
  • Step 4: Disconnect old consumers' connections
  • 1:1 replacement for >= v1.0.0
  • Step 0: Obtain user-supplied values.
  • Step 1: Obtain the credentials of your current deployment.
  • Step 2: Uninstall existing helm installation
  • Step 3: Upgrade Memphis helm repo
  • Step 4: Reinstall Memphis
  • Upgrade Memphis cluster with "helm upgrade" using a manual rolling upgrade
  • Step 0: Obtain user-supplied values.
  • Step 1: Obtain the credentials of your current deployment
  • Step 2: Delete the statefulset with cascade=orphan option
  • Step 3: Run helm upgrade with all the values you need + updateStrategy=OnDelete
  • Step 4: Upgrade brokers. Delete one by one and validate each one to get back to the online state.
  • 1:1 replacement for versions < v1.0.0
  • Step 0: Obtain user-supplied values.
  • Step 1: Obtain the credentials of your current deployment.
  • Step 2: Uninstall existing helm installation
  • Step 3: Upgrade Memphis helm repo
  • Step 4: Reinstall Memphis

Was this helpful?

  1. Open-Source Installation
  2. Kubernetes

3 - Upgrade

How to upgrade Memphis on K8S

Last updated 1 year ago

Was this helpful?

Discover step-by-step instructions and best practices for safely and efficiently updating your Memphis installation to the latest version.

Step 1: Deploy the new Memphis version

Step 2: Create a second connection for the consumers

Establish an additional connection and consumer entities within each existing consumer, enabling them to consume messages from both the existing Memphis and the newly created version.

Step 3: Shift producers to the newer version

Reestablish the connections for the producers to send messages to the newly created Memphis.

Step 4: Disconnect old consumers' connections

After ensuring that all the existing messages on the older Memphis server have been processed, it is secure to disconnect the connections to the older Memphis server and finalize the migration.

1:1 replacement for >= v1.0.0

Step 0: Obtain user-supplied values.

helm get values memphis --namespace memphis

Step 1: Obtain the credentials of your current deployment.

export CT=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.CONNECTION_TOKEN}" | base64 -d)
export ROOT_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.ROOT_PASSWORD}" | base64 -d)
export PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.password}" | base64 -d)
export REPMGR_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.repmgr-password}" | base64 -d)
export ADMIN_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata-coordinator -o jsonpath="{.data.admin-password}" | base64 -d)
export ENCRYPTION_SECRET_KEY=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.ENCRYPTION_SECRET_KEY}" | base64 -d)

Step 2: Uninstall existing helm installation

helm uninstall memphis --namespace memphis

Data will not be lost! PVCs are not removed and will be re-attached to the new installation

Step 3: Upgrade Memphis helm repo

helm repo update

Step 4: Reinstall Memphis

Production

Production-grade Memphis with a minimum of three memphis brokers configured in cluster-mode. Add user-supplied values if necessary.

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update && 
helm install memphis --set global.cluster.enabled="true",metadata.postgresql.password=$PASSWORD,metadata.postgresql.repmgrPassword=$REPMGR_PASSWORD,metadata.pgpool.adminPassword=$ADMIN_PASSWORD,memphis.creds.connectionToken=$CT,memphis.creds.rootPwd=$ROOT_PASSWORD,memphis.creds.encryptionSecretKey=$ENCRYPTION_SECRET_KEY  memphis/memphis --create-namespace --namespace memphis --wait
Dev

Standalone installation of Memphis with a single broker. Add user-supplied values if necessary.

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update && 
helm install memphis --set metadata.postgresql.password=$PASSWORD,metadata.postgresql.repmgrPassword=$REPMGR_PASSWORD,metadata.pgpool.adminPassword=$ADMIN_PASSWORD,memphis.creds.connectionToken=$CT,memphis.creds.rootPwd=$ROOT_PASSWORD,memphis.creds.encryptionSecretKey=$ENCRYPTION_SECRET_KEY  memphis/memphis --create-namespace --namespace memphis --wait

Upgrade Memphis cluster with "helm upgrade" using a manual rolling upgrade

Step 0: Obtain user-supplied values.

helm get values memphis --namespace memphis

Step 1: Obtain the credentials of your current deployment

export CT=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.CONNECTION_TOKEN}" | base64 -d)
export ROOT_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.ROOT_PASSWORD}" | base64 -d)
export PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.password}" | base64 -d)
export REPMGR_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata -o jsonpath="{.data.repmgr-password}" | base64 -d)
export ADMIN_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-metadata-coordinator -o jsonpath="{.data.admin-password}" | base64 -d)
export ENCRYPTION_SECRET_KEY=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.ENCRYPTION_SECRET_KEY}" | base64 -d)

Step 2: Delete the statefulset with cascade=orphan option

kubectl delete statefulset memphis --cascade=orphan -n memphis

Step 3: Run helm upgrade with all the values you need + updateStrategy=OnDelete

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update &&helm upgrade --install memphis --set metadata.postgresql.password=$PASSWORD,metadata.postgresql.repmgrPassword=$REPMGR_PASSWORD,metadata.pgpool.adminPassword=$ADMIN_PASSWORD,memphis.creds.connectionToken=$CT,memphis.creds.rootPwd=$ROOT_PASSWORD,memphis.creds.encryptionSecretKey=$ENCRYPTION_SECRET_KEY memphis/memphis --create-namespace --namespace memphis --wait

Step 4: Upgrade brokers. Delete one by one and validate each one to get back to the online state.

1:1 replacement for versions < v1.0.0

Step 0: Obtain user-supplied values.

helm get values memphis --namespace memphis

Step 1: Obtain the credentials of your current deployment.

export CT=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.CONNECTION_TOKEN}" | base64 -d)
export ROOT_PASSWORD=$(kubectl get secret --namespace "memphis" memphis-creds -o jsonpath="{.data.ROOT_PASSWORD}" | base64 -d)

Step 2: Uninstall existing helm installation

helm uninstall memphis -n memphis

Data will not be lost! PVCs are not removed and will be re-attached to the new installation

Step 3: Upgrade Memphis helm repo

helm repo update

Step 4: Reinstall Memphis

Production

Production-grade Memphis with a minimum of three memphis brokers configured in cluster-mode. Add user-supplied values if necessary.

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update && 
helm install memphis --set global.cluster.enabled="true",connectionToken=$CT,rootPwd=$ROOT_PASSWORD memphis/memphis --create-namespace --namespace memphis --wait
Dev

Standalone installation of Memphis with a single broker. Add user-supplied values if necessary.

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update && 
helm install memphis --set connectionToken=$CT,rootPwd=$ROOT_PASSWORD memphis/memphis --create-namespace --namespace memphis --wait
📦