emqx-ee

by EMQX

Helm chartv4.4.38App 4.4.38

A Helm chart for EMQ X

About this chart

Introduction

This chart bootstraps an emqx deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.6+
  • Helm

Installing the Chart

To install the chart with the release name my-emqx:

  • From github

    $ git clone https://github.com/emqx/emqx.git
    $ cd emqx/deploy/charts/emqx
    $ helm install my-emqx .
    
  • From chart repos

    helm repo add emqx https://repos.emqx.io/charts
    helm install my-emqx emqx/emqx
    

    If you want to install an unstable version, you need to add --devel when you execute the helm install command.

Uninstalling the Chart

To uninstall/delete the my-emqx deployment:

$ helm del  my-emqx

Configuration

The following table lists the configurable parameters of the emqx chart and their default values.

ParameterDescriptionDefault Value
replicaCountIt is recommended to have odd number of nodes in a cluster, otherwise the emqx cluster cannot be automatically healed in case of net-split.3
image.tagEMQX Image tag (defaults to .Chart.AppVersion)nil
image.repositoryEMQX Image repositoryemqx/emqx
image.pullPolicyThe image pull policyIfNotPresent
image.pullSecrets The image pull secrets (does not add image pull secrets to deployed pods)[]
serviceAccount.createIf true, create a new service accounttrue
serviceAccount.nameService account to be used. If not set and serviceAccount.create is true, a name is generated using the fullname template
serviceAccount.annotationsAnnotations to add to the service account
recreatePodsForces the recreation of pods during upgrades, which can be useful to always apply the most recent configuration.false
podAnnotations Annotations for pod{}
podManagementPolicyTo redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlockParallel
persistence.enabledEnable EMQX persistence using PVCfalse
persistence.storageClassStorage class of backing PVC (uses alpha storage class annotation)nil
persistence.existingClaimEMQX data Persistent Volume existing claim name, evaluated as a template""
persistence.accessModePVC Access Mode for EMQX volumeReadWriteOnce
persistence.sizePVC Storage Request for EMQX volume20Mi
initContainersContainers that run before the creation of EMQX containers. They can contain utilities or setup scripts.{}
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityMap of node/pod affinities{}
service.typeKubernetes Service type.ClusterIP
service.mqttPort for MQTT.1883
service.mqttsslPort for MQTT(SSL).8883
service.mgmtPort for mgmt API.8081
service.wsPort for WebSocket/HTTP.8083
service.wssPort for WSS/HTTPS.8084
service.dashboardPort for dashboard.18083
service.nodePorts.mqttKubernetes node port for MQTT.nil
service.nodePorts.mqttsslKubernetes node port for MQTT(SSL).nil
service.nodePorts.mgmtKubernetes node port for mgmt API.nil
service.nodePorts.wsKubernetes node port for WebSocket/HTTP.nil
service.nodePorts.wssKubernetes node port for WSS/HTTPS.nil
service.nodePorts.dashboardKubernetes node port for dashboard.nil
service.loadBalancerIPloadBalancerIP for Servicenil
service.loadBalancerSourceRangesAddress(es) that are allowed when service is LoadBalancer[]
service.externalIPsExternalIPs for the service[]
service.externalTrafficPolicyExternal Traffic Policy for the serviceCluster
service.annotationsService annotations (evaluated as a template){}
ingress.dashboard.enabledEnable ingress for EMQX Dashboardfalse
ingress.dashboard.ingressClassNameSet the ingress class for EMQX Dashboard
ingress.dashboard.pathIngress path for EMQX Dashboard/
ingress.dashboard.hostsIngress hosts for EMQX Mgmt APIdashboard.emqx.local
ingress.dashboard.tlsIngress tls for EMQX Mgmt API[]
ingress.dashboard.annotationsIngress annotations for EMQX Mgmt API{}
ingress.mgmt.enabledEnable ingress for EMQX Mgmt APIfalse
ingress.mqtt.ingressClassNameSet the ingress class for EMQX Mgmt APInil
ingress.mgmt.pathIngress path for EMQX Mgmt API/
ingress.mgmt.hostsIngress hosts for EMQX Mgmt APIapi.emqx.local
ingress.mgmt.tlsIngress tls for EMQX Mgmt API[]
ingress.mgmt.annotationsIngress annotations for EMQX Mgmt API{}
ingress.wss.enabledEnable ingress for EMQX Mgmt APIfalse
ingress.wss.ingressClassNameSet the ingress class for EMQX Mgmt APInil
ingress.wss.pathIngress path for EMQX WSS/
ingress.wss.hostsIngress hosts for EMQX WSSwss.emqx.local
ingress.wss.tlsIngress tls for EMQX WSS[]
ingress.wss.annotationsIngress annotations for EMQX WSS{}
extraEnvAditional container env vars[]
extraEnvFromAditional container env from vars (eg. config map, secrets[]
extraArgsAdditional container executable arguments[]
extraVolumesAdditional container volumes (eg. for mounting certs from secrets)[]
extraVolumeMountsAdditional container volume mounts (eg. for mounting certs from secrets)[]

EMQX specific settings

The following table lists the configurable EMQX-specific parameters of the chart and their default values. Parameter | Description | Default Value --- | --- | --- emqxConfig | Map of configuration items expressed as environment variables (prefix can be omitted) or using the configuration files namespaced dotted notation | nil emqxLicenseSecretName | Name of the secret that holds the license information | nil emqxAclConfig | ACL configuration | {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}. {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}. {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}. {allow, all}. emqxLoadedModules | Modules to load on startup | {emqx_mod_acl_internal, true}. {emqx_mod_presence, true}. {emqx_mod_delayed, false}. {emqx_mod_rewrite, false}. {emqx_mod_subscription, false}. {emqx_mod_topic_metrics, false}. emqxLoadedPlugins | Plugins to load on startup | {emqx_management, true}. {emqx_recon, true}. {emqx_retainer, true}. {emqx_dashboard, true}. {emqx_telemetry, true}. {emqx_rule_engine, true}. {emqx_bridge_mqtt, false}.

Examples

This section provides some examples for the configuration of common scenarios.

Enable Websockets SSL via nginx-ingress community controller

The following settings describe a working scenario for acessing EMQX Websockets with SSL termination at the nginx-ingress community controller.

ingress:
  wss:
    enabled: true
    # ingressClassName: nginx
    annotations:
      nginx.ingress.kubernetes.io/backend-protocol: "http"
      nginx.ingress.kubernetes.io/use-forwarded-headers: "true"
      nginx.ingress.kubernetes.io/enable-real-ip: "true"
      nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
      nginx.ingress.kubernetes.io/proxy-connect-timeout: "120"
      nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
      nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
      nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
      nginx.ingress.kubernetes.io/use-proxy-protocol: "false"
      nginx.ingress.kubernetes.io/proxy-protocol-header-timeout: "5s"
    path: /mqtt
    hosts:
    - myhost.example.com
    tls:
    - hosts:
        - myhost.example.com
      secretName: myhost-example-com-tls # Name of the secret that holds the certificates for the domain

Deploy emqx-ee with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has emqx-ee on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartemqx-ee is pinned at v4.4.38 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply