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:
apps.emqx.io/v1beta4 EmqxEnterprise supports configuring the log level of EMQX cluster through .spec.template.spec.emqxContainer.emqxConfig field. For the specific description of the emqxConfig field, please refer to: emqxConfig.
Save the following content as a YAML file and deploy it with the kubectl apply command
The .spec.template.spec.emqxContainer.emqxConfig field configures the EMQX cluster log level to debug.
Wait for the EMQX cluster to be ready, you can check the status of the EMQX cluster through the kubectl get command, please make sure that 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'198.18.3.10
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 configuration of EMQX cluster log level through .spec.bootstrapConfig. The configuration of bootstrapConfig can 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. If you need to modify the cluster log level after creating EMQX, please modify it through EMQX Dashboard.
Save the following content as a YAML file and deploy it with the kubectl apply command
The .spec.bootstrapConfig field configures the EMQX cluster log level to debug.
Wait for the EMQX cluster to be ready, you can check the status of the EMQX cluster through the kubectl get command, please make sure that STATUS is Running, this may take some time
$ kubectl get emqx
NAME IMAGE STATUS AGE
emqx emqx:5.0 Running 10m
1 2 3
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.
MQTT X CLI(opens new window) is an open source MQTT 5.0 command line client tool, designed to help developers to more Quickly develop and debug MQTT services and applications.
Obtain the External IP of EMQX cluster
external_ip=$(kubectl get svc emqx-ee -o json | jq '.status.loadBalancer.ingress[0].ip')
1
external_ip=$(kubectl get svc emqx-listeners -o json | jq '.status.loadBalancer.ingress[0].ip')
Use the command line to view EMQX cluster log information
$ kubectl logs emqx-core-0 -c emqx
1
You can get a print similar to the following, which means that EMQX has received a CONNECT message from the client and replied a CONNACK message to the client: