RabbitMQ群集失败,错误为no endpoints available

t98cgbkg  于 2022-11-23  发布在  RabbitMQ
关注(0)|答案(1)|浏览(171)

我正在尝试使用Terraform在K8S上设置RabbitMQ Operator + RabbitMQ Cluster
我成功安装了cert-managerrabbitmq-cluster-operator。我正在尝试使用以下link创建RabbitMQCluster
但是,RabbitMQCluster失败,并显示以下消息和输出

Message:               The service has no endpoints available
 Reason:                NoEndpointsAvailable

输出(定制输出)

[root@re-ctrl02 rbmq]# kubectl describe RabbitmqCluster -n rabbitmq-system
Name:         basic-cluster
Namespace:    rabbitmq-system
Labels:       <none>
Annotations:  <none>
API Version:  rabbitmq.com/v1beta1
Kind:         RabbitmqCluster
Spec:
  Image:  rabbitmq:3.8.18-management
  Override:
    Stateful Set:
      Spec:
        Template:
          Spec:
            Containers:
              Name:  rabbitmq
              Resources:
              Name:  rabbitmq
              Resources:
  Rabbitmq:
    Additional Config:                    hostname = "https://localhost"
                  host = "https://localhost"
                  port = "5672"
                  nodes = "rabbit@localhost"
                  default_vhost = "/"
                  default_user = "admin"
                  default_pass = "admin"
                  default_user_tags.administrator = true

  Replicas:  1
  Service:
    Type:                            NodePort
  Termination Grace Period Seconds:  604800
  Tls:
Status:
  Binding:
    Name:  basic-cluster-default-user
  Conditions:
    Last Transition Time:  2021-08-09T13:51:42Z
    Message:               0/1 Pods ready
    Reason:                NotAllPodsReady
    Status:                False
    Type:                  AllReplicasReady
    Last Transition Time:  2021-08-09T13:51:42Z
    Message:               The service has no endpoints available
    Reason:                NoEndpointsAvailable
    Status:                False
    Type:                  ClusterAvailable
    Last Transition Time:  2021-08-09T13:51:42Z
    Reason:                NoWarnings
    Status:                True
    Type:                  NoWarnings
    Last Transition Time:  2021-08-09T13:51:42Z
    Reason:                Initialising
    Status:                Unknown
    Type:                  ReconcileSuccess

我不确定要将which service it refers添加到文件main.tf中,也不确定应在文件main.tf中添加哪些条目
请让我知道我做错了什么

pobjuy32

pobjuy321#

我也有同样的问题。一个关于statefulset的描述说:

kubectl describe statefulsets.apps basic-cluster

您需要添加名称空间。
Warning FailedCreate 8s (x12 over 18s) statefulset-controller create Pod examplerabbitmq-server-0 in StatefulSet examplerabbitmq-server failed error: Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post "https://istio-sidecar-injector.istio-system.svc:443/inject?timeout=30s": service "istio-sidecar-injector" not found
所以你很可能需要安装istio

  • curl -L https://istio.io/downloadIstio| sh之义
  • 光盘系统-1.14.0/
  • 导出路径= $PWD/bin:$PATH
  • istioctl安装--设置配置文件=演示-y
  • kubectl标签名称空间istio-injection =启用
  • 库贝特尔应用-f兔mq. yaml
  • kubectl描述状态集。应用程序示例abbitmq

正常成功创建2m49s状态集控制器创建Pod示例状态集中的abbitmq-server-2示例abbitmq-server成功

相关问题