当前位置: 首页 > 知识库问答 >
问题:

无法使用RabbitMQ cluster Kubernetes运算符创建RabbitMQ实例

董昕
2023-03-14

我试图使用RabbitMQ cluster Kubernetes操作符创建一个RabbitMQ实例,但是PersistentVolumeClaims存在一个问题。我正在使用Docker Desktop for Windows运行Kubernetes 1.18.8。

kubectl apply -f "https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml"
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: nccrabbitmqcluster
$ kubectl get all | grep rabbit
pod/nccrabbitmqcluster-server-0         0/1     Pending   0          14m
service/nccrabbitmqcluster                  ClusterIP      10.100.186.115   <none>        5672/TCP,15672/TCP   14m
service/nccrabbitmqcluster-nodes            ClusterIP      None             <none>        4369/TCP,25672/TCP   14m
statefulset.apps/nccrabbitmqcluster-server     0/1     14m
$ kubectl describe pod/nccrabbitmqcluster-server-0 | tail -n 5
Events:
  Type     Reason            Age        From               Message
  ----     ------            ----       ----               -------
  Warning  FailedScheduling  <unknown>  default-scheduler  running "VolumeBinding" filter plugin for pod "nccrabbitmqcluster-server-0": pod has unbound immediate PersistentVolumeClaims
  Warning  FailedScheduling  <unknown>  default-scheduler  running "VolumeBinding" filter plugin for pod "nccrabbitmqcluster-server-0": pod has unbound immediate PersistentVolumeClaims
$ kubectl describe pvc persistence-nccrabbitmqcluster-server-0
Name:          persistence-nccrabbitmqcluster-server-0
Namespace:     default
StorageClass:  hostpath
Status:        Pending
Volume:
Labels:        app.kubernetes.io/component=rabbitmq
               app.kubernetes.io/name=nccrabbitmqcluster
               app.kubernetes.io/part-of=rabbitmq
Annotations:   volume.beta.kubernetes.io/storage-provisioner: docker.io/hostpath
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Mounted By:    nccrabbitmqcluster-server-0
Events:
  Type    Reason                Age                 From                         Message
  ----    ------                ----                ----                         -------
  Normal  ExternalProvisioning  27s (x23 over 19m)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "docker.io/hostpath" or manually created by system administrator
$ kubectl get storageclasses
NAME                 PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
hostpath (default)   docker.io/hostpath   Delete          Immediate           false                  20d
$ kubectl get pv | grep rabbit

为什么不自动创建卷,我应该做什么?

共有1个答案

东门胤
2023-03-14

是的,您的本地主机路径不能作为动态卷设置器工作。此运算符需要一个storageclassname,它可以动态创建PVS。在您的情况下,您的操作员持续等待PV被创建。取而代之的是,您可以手动创建一个PV和PVC,如果您是在本地机器上做。查看以下示例-https://github.com/rabbitmq/cluster-operator/blob/main/docs/examples/multiple-disks/rabbitmq.yaml

如果你想尝试像AWS这样的云提供商,那么这很容易。在集群中部署EBS CSI驱动程序,这将为您创建一个storageclass,该storageclass将提供动态卷。

 类似资料:
  • 我收到了一个关于这个问题的建议,一个评论,说我可能没有我需要的交换,因为我的队列已经存在。于是,我就全部手动删除了。 但是,在重新部署应用程序时,我发现所有队列都有以下异常: 我不确定这意味着什么,因为我显然想要创建队列<code>myInput。组,它似乎在抱怨它不存在。。。 我也检查了这个问题,我的问题可能是权限。但我应该有它们——否则我相信我无法删除队列...... 你能给我一个解决方案吗?

  • 有可能使用@Configurable类那 我知道用@Autowired和@Resource等是可能的...还有其他的吗? 如。 然后像这样 除了能够使用<code>new</code>操作符创建<code>MyObj</code>并仍然让spring处理注释之外,还有其他选择吗? ——编辑: 在使用@Autowired时,可以使用来做到这一点,看看一些带有Spring和AOP的Hibernate和

  • 每次我尝试创建一个新的计算机时,它都会说创建失败了,所以我无法工作。我的区域是francecentral,我尝试了不同大小的虚拟机

  • 返回前用调试器运行程序时,指针的值为0x0000000009DFAA90,但的值变为0x0000000009DFAA98。 这种情况只发生在字符串类型中。我试着对我的一个类的“int[10]”、“string*[10]”和对象做同样的操作,但问题只发生在处理string和代码时: 工作非常好。 有没有人能解释一下为什么会发生这种情况,以及如何使它正常工作? PS:我们正在使用Visual Stud

  • 假设: 2的补码形式的32位有符号整数 true和false是值为1和0的整数 java运算符 你能实现像<代码>

  • 本文向大家介绍ES6扩展运算符和rest运算符用法实例分析,包括了ES6扩展运算符和rest运算符用法实例分析的使用技巧和注意事项,需要的朋友参考一下 本文实例讲述了ES6扩展运算符和rest运算符用法。分享给大家供大家参考,具体如下: 运算符可以很好的为我们解决参数和对象数组未知情况下的编程,让我们的代码更健壮和简洁。 运算符有两种:对象扩展运算符与rest运算符。 1.对象扩展( spread