EMQX Operator 控制器报错

环境信息

  • EMQX 版本:5.0.7
  • 操作系统及版本:K3S,Kubernetes v1.21.0
  • 其他

问题描述

按照 文档 进行部署

pod emqx-operator-controller-manager-b888f67b4-s7475 中出现错误

2022-09-22T03:00:54Z	ERROR	Reconciler error	{"controller": "emqx", "controllerGroup": "apps.emqx.io", "controllerKind": "EMQX", "eMQX": {"name":"emqx","namespace":"emqx-operator-system"}, "namespace": "emqx-operator-system", "name": "emqx", "reconcileID": "33529754-a4bf-4144-af82-5e161a1b7f2e", "error": "failed to update StatefulSet emqx-core: Operation cannot be fulfilled on statefulsets.apps \"emqx-core\": the object has been modified; please apply your changes to the latest version and try again", "errorVerbose": "Operation cannot be fulfilled on statefulsets.apps \"emqx-core\": the object has been modified; please apply your changes to the latest version and try again\nfailed to update StatefulSet emqx-core\ngithub.com/emqx/emqx-operator/pkg/handler.(*Handler).Update\n\t/workspace/pkg/handler/handler.go:176\ngithub.com/emqx/emqx-operator/pkg/handler.(*Handler).CreateOrUpdate\n\t/workspace/pkg/handler/handler.go:149\ngithub.com/emqx/emqx-operator/pkg/handler.(*Handler).CreateOrUpdateList\n\t/workspace/pkg/handler/handler.go:84\ngithub.com/emqx/emqx-operator/controllers/apps/v2alpha1.(*EMQXReconciler).Reconcile\n\t/workspace/controllers/apps/v2alpha1/emqx_controller.go:88\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:121\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:320\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:234\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1571"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:234

可以忽略这个 error log,这是 K8S 故意设计的,详情查看:https://github.com/kubernetes/kubernetes/issues/28149

这个文档只提供了开启18083端口,有没有提供开启ws和其他tcp mqtt端口的配置?

emqx 的 listener 端口会在 emqx 容器就绪后,Operator 自动发现并绑定到 service 上去的