我正在尝试使用Terraform在K8S上设置RabbitMQ Operator + RabbitMQ Cluster
我成功安装了cert-manager
和rabbitmq-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
中添加哪些条目
请让我知道我做错了什么
1条答案
按热度按时间pobjuy321#
我也有同样的问题。一个关于statefulset的描述说:
您需要添加名称空间。
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
正常成功创建2m49s状态集控制器创建Pod示例状态集中的abbitmq-server-2示例abbitmq-server成功