Roushan
Roushan

Reputation: 274

How to specify nodeSelector for RabbitMQ on Azure AKS Hybrid cluster

I have created a Azure AKS cluster which is having one Linux node and one Windows Node. Now when I am setting up RabbitMQ, it is saying "Container Creating" for long time. If I am removing Windows node, the RabitMQ configuration is getting success.

I want to know how can I properly set node selector.

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

Upvotes: 0

Views: 1062

Answers (1)

Arghya Sadhu
Arghya Sadhu

Reputation: 44657

To deploy an application on linux nodes you can do as below by specifying "beta.kubernetes.io/os": linux as 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

Upvotes: 2

Related Questions