apiVersion: v1
kind: Pod
metadata:
  name: monitor1-rabbit
  namespace: default
  labels:
    app: monitor1-rabbit
spec:
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: kubernetes.io/hostname
            operator: In
            values:
            - perl
            - host.local
  restartPolicy: Always
  containers:
  - name: monitor1-rabbit
    image: rabbitmq:3
    ports:
      - name: web1
        containerPort: 4369
        protocol: TCP
      - name: web2
        containerPort: 5671
        protocol: TCP
      - name: web3
        containerPort: 5672
        protocol: TCP
      - name: web4
        containerPort: 15691
        protocol: TCP
      - name: web5
        containerPort: 15692
        protocol: TCP
      - name: web6
        containerPort: 25672
        protocol: TCP
