---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: rabbitmq-deployment
  labels:
    app: rabbitmq
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rabbitmq
  template:
    metadata:
      labels:
        app: rabbitmq
    spec:
      containers:
        - name: rabbitmq
          image: rabbitmq:3.7-management
          ports:
            - containerPort: 15672
          env:
            - name: RABBITMQ_DEFAULT_USER
              value: testuser
            - name: RABBITMQ_DEFAULT_PASS
              value: testing123
          readinessProbe:
            tcpSocket:
              port: 15672
            initialDelaySeconds: 5
            periodSeconds: 5
            timeoutSeconds: 5
