azure - 如何在 Azure AKS 混合群集上为 RabbitMQ 指定节点选择器

标签 azure kubernetes

我创建了一个 Azure AKS 群集,该群集具有一个 Linux 节点和一个 Windows 节点。现在,当我设置 RabbitMQ 时,它长时间显示“容器创建”。 如果我删除 Windows 节点,RabitMQ 配置就会成功。

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

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

最佳答案

要在 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

关于azure - 如何在 Azure AKS 混合群集上为 RabbitMQ 指定节点选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65490248/

相关文章:

c# - 从本地主机将 KeyVault 身份验证为虚拟应用程序服务身份

c# - 将网站和类库部署到 Azure

docker - 在没有 datadog 代理的情况下将容器标准输出日志转发到 datadog

node.js - 如何将 Azure-key-vault 与 AKS pod 连接?

azure - Visual Studio 2017 - 部署到 Azure Function v2 (.NetCore v2.1) 错误 : required process (“Web Management Service” ) is started

azure - Azure AD 资源组的体系结构

azure - 为我的 Azure 功能选择哪个计划 : Consumption Plan or App Service Plan?

redis - 升级图表时 Helm 相关性更新

kubernetes - Redis 似乎在启动时删除了 dump.rdb。使用 Kubernetes PVC 和 KubeDB。为什么会这样?

docker - Google容器引擎上的Http