# Deploy EMQX on Google Kubernetes Engine

# Overview

This guide will walk you through the process of deploying EMQX, an open-source MQTT broker, on Google Kubernetes Engine (GKE). By following these steps, you'll learn how to create and configure an EMQX deployment on GKE.

# Prerequisites

# Deploy EMQX on GKE

# Deploy EMQX Operator

To install EMQX Operator, you can follow this guide Quick Start (opens new window) for a step-by-step installation, but be mindful of the cert-manager installation process.

WARING

For the detailed steps on installing cert-manager, see the official documentation:

Remember to install CRDs when running helm with the --set installCRDs=true flag.

More information can be found at cert-manager (opens new window).

# Enable EMQX Cluster Persistence

Google Kubernetes Engine (GKE) now supports a new storage class designed specifically for EMQX message broker deployments. This GKE storage class enhances high-availability and performance, ensuring seamless MQTT message handling and efficient resource utilization in IoT and edge computing environments.

kubectl get sc
1

Outputs:

NAME                        PROVISIONER                    RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
standard                    kubernetes.io/gce-pd           Delete          Immediate              true                   47h
...
1
2
3

This guide uses the standard storage class.

For more storage classes, please check gcp docs (opens new window)

# Deploy EMQX Cluster

Below are the relevant configurations for EMQX Custom Resource. Choose the corresponding APIVersion based on the EMQX version you want to deploy. For specific compatibility relationships, please check EMQX Operator Compatibility:

# Verify the deployment

# Use LoadBalancer for TLS offloading

Since Google LoadBalancer doesn't support TCP certificates, please check discussion (opens new window) to address TCP certificate offloading issues.