【问题标题】:How to specify nodeSelector for RabbitMQ on Azure AKS Hybrid cluster如何在 Azure AKS 混合群集上为 RabbitMQ 指定 nodeSelector
【发布时间】:2020-12-29 19:32:16
【问题描述】:

我创建了一个 Azure AKS 集群,它有一个 Linux 节点和一个 Windows 节点。现在当我设置 RabbitMQ 时,它一直在说“容器创建”。 如果我要删除 Windows 节点,则 RabitMQ 配置会成功。

我想知道如何正确设置节点选择器。

nodeSelector:
  beta.kubernetes.io/os: linux
  kubernetes.io/os: linux
  worker: rabbitmq

【问题讨论】:

    标签: azure kubernetes


    【解决方案1】:

    要在 linux 节点上部署应用程序,您可以通过将 "beta.kubernetes.io/os": linux 指定为 nodeSelector 来执行以下操作

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: sample
      labels:
        app: sample
    spec:
      replicas: 1
      template:
        metadata:
          name: sample
          labels:
            app: sample
        spec:
          nodeSelector:
            "beta.kubernetes.io/os": linux
          containers:
          - name: rabbitmq
            image: rabbitmq
            resources:
              limits:
                cpu: 1
                memory: 800M
              requests:
                cpu: .1
                memory: 300M
            ports:
              - containerPort: 80
      selector:
        matchLabels:
          app: sample
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-06
      • 1970-01-01
      • 2020-05-06
      • 2021-01-27
      • 2019-10-20
      • 1970-01-01
      相关资源
      最近更新 更多