The following is the relevant configuration of EMQX Custom Resource. You can choose the corresponding APIVersion according to the version of EMQX you want to deploy. For the specific compatibility relationship, please refer to EMQX Operator Compatibility:
A Secret is an object that contains a small amount of sensitive information such as a password, token, or key. For more detailed documentation on Secret, please refer to: Secret(opens new window). EMQX Operator supports using Secret to mount License information, so we need to create a Secret based on the License before creating an EMQX cluster.
${your_license_name} represents the name of the created Secret.
${/path/to/license/file} represents the path of the EMQX Enterprise Edition License file, which can be an absolute path or a relative path. For more details on using kubectl to create a Secret, please refer to the document: Using kubectl to create a secret(opens new window).
Save the following content as a YAML file and deploy it via the kubectl apply command
apps.emqx.io/v1beta4 EmqxEnterprise supports configuring EMQX Enterprise License through .spec.license field. For more information, please refer to: license.
secretName represents the name of the Secret created in the previous step.
Wait for the EMQX cluster to be ready, you can check the status of the EMQX cluster through kubectl get command, please make sure STATUS is Running, this may take some time
$ kubectl get emqxenterprises
NAME STATUS AGE
emqx-ee Running 8m33s
1 2 3
Obtain the External IP of EMQX cluster and access EMQX console
$ kubectl get svc emqx-ee -o json | jq '.status.loadBalancer.ingress[0].ip'192.168.1.200
1 2 3
Access http://192.168.1.200:18083 through a browser, and use the default username and password admin/public to login EMQX console.
apps.emqx.io/v2alpha1 EMQX supports configuring EMQX cluster license through .spec.bootstrapConfig. For bootstrapConfig configuration, please refer to the document: bootstrapConfig(opens new window). This field is only allowed to be configured when creating an EMQX cluster, and does not support updating.
After the EMQX cluster is created, if the license needs to be updated, please update it through the EMQX Dashboard.
Save the following content as a YAML file and deploy it via the kubectl apply command
The license.key in the bootstrapConfig field represents the Licesne content. In this example, the License content is omitted, please fill it in by the user.
Wait for the EMQX cluster to be ready, you can check the status of the EMQX cluster through kubectl get command, please make sure STATUS is Running, this may take some time
$ kubectl get emqx emqx
NAME IMAGE STATUS AGE
emqx emqx:5.0 Running 10m
1 2 3
Obtain the Dashboard External IP of EMQX cluster and access EMQX console
EMQX Operator will create two EMQX Service resources, one is emqx-dashboard and the other is emqx-listeners, corresponding to EMQX console and EMQX listening port respectively.
$ kubectl get svc emqx-dashboard -o json | jq '.status.loadBalancer.ingress[0].ip'192.168.1.200
1 2 3
Access http://192.168.1.200:18083 through a browser, and use the default username and password admin/public to login EMQX console.
The following output can be obtained. From the output results, we can see the basic information of the license we applied for, including the applicant's information, the maximum number of connections supported by the license, and the expiration time of the license.
You can get information similar to the following. From the max_connections field, you can see that the content of the License has been updated, which means that the EMQX Enterprise Edition License has been updated successfully. If the certificate information is not updated, you can wait for a while, the update of the license will be delayed.
Open the browser, enter Dashboard, click Overview and pull down the page to the bottom to see the current license information of the cluster, as shown in the following figure:
Then click the Update License button to upload the latest License Key content, as shown in the following figure:
Finally, click the Save button to save the update. The following picture shows the updated License information:
As can be seen from the above figure, the content of the license has been updated, which means that the license has been updated successfully.