Upgrade EMQX Operator
This page provides instructions on how to upgrade EMQX Operator to the latest version, 2.3.0.
Upgrade from EMQX Operator 2.2.x to 2.3.0
Before starting the upgrade process, make sure that all EMQX custom resources are using the
v2beta1API version. EMQX Operator 2.3.0 does not support API versions earlier thanv2beta1.If your resources are still using
v2alpha1orv1beta4API versions, update them tov2beta1. In most cases, this can be done by patching theapiVersionfield:shkubectl patch emqx emqx --type=merge -p '{"apiVersion":"apps.emqx.io/v2beta1"}'Patch the existing EMQX CRDs to explicitly remove the conversion webhook.
shkubectl patch crd emqxes.apps.emqx.io --type=json -p='[{"op":"replace", "path":"/spec/conversion", "value":{"strategy":"None"}}]' kubectl patch crd rebalances.apps.emqx.io --type=json -p='[{"op":"replace", "path":"/spec/conversion", "value":{"strategy":"None"}}]'After patching the EMQX CRDs, delete the existing controller manager deployment and other related resources.
shkubectl delete --ignore-not-found clusterrole emqx-operator-manager-role kubectl delete --ignore-not-found clusterrolebinding emqx-operator-manager-rolebinding kubectl delete --ignore-not-found mutatingwebhookconfiguration emqx-operator-mutating-webhook-configuration kubectl delete --ignore-not-found validatingwebhookconfiguration emqx-operator-validating-webhook-configuration kubectl delete --ignore-not-found namespace emqx-operator-systemOptionally, delete legacy CRDs.
shkubectl delete --ignore-not-found crd emqxbrokers.apps.emqx.io emqxenterprises.apps.emqx.io emqxplugins.apps.emqx.ioDeploy the new EMQX Operator by following the installation steps.