# Deploy EMQX Operator
In this section, we will walk you through the steps required to efficiently set up the environment for the EMQX Operator, install the Operator, and then use it to deploy EMQX. By following the guidelines outlined in this section, you will be able to effectively install and manage EMQX using the EMQX Operator.
# Prepare the Environment
Before deploying EMQX Operator, please confirm that the following components have been ready:
A running Kubernetes cluster (opens new window), for a version of Kubernetes, please check How to selector Kubernetes version
A kubectl (opens new window) tool that can access the Kubernetes cluster. You can check the status of the Kubernetes cluster using
kubectl cluster-info
command.Helm (opens new window) 3 or higher
# Install EMQX Operator
Install and start
cert-manager
.TIP
cert-manager
version1.1.6
or higher is required. Skip this step if thecert-manager
is already installed and started.You can use Helm to install
cert-manager
.$ helm repo add jetstack https://charts.jetstack.io $ helm repo update $ helm upgrade --install cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --set installCRDs=true
1
2
3
4
5
6Or you can follow the cert-manager installation guide (opens new window) to install it.
Install the EMQX Operator with the command below:
$ helm repo add emqx https://repos.emqx.io/charts $ helm repo update $ helm upgrade --install emqx-operator emqx/emqx-operator \ --namespace emqx-operator-system \ --create-namespace
1
2
3
4
5Wait till EMQX Operator is ready:
$ kubectl wait --for=condition=Ready pods -l "control-plane=controller-manager" -n emqx-operator-system pod/emqx-operator-controller-manager-57bd7b8bd4-h2mcr condition met
1
2
3
Now that you have successfully installed the operator, you are ready to proceed to the next step. In the Deploy EMQX section, you will learn how to use the EMQX Operator to deploy EMQX.
Alternatively, if you are interested in learning how to upgrade or uninstall EMQX using the operator, you can continue reading this section.