apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: rabbitmq
  labels:
    app.kubernetes.io/name: rabbitmq
spec:
  serviceName: rabbitmq
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: rabbitmq
  template:
    metadata:
      labels:
        app.kubernetes.io/name: rabbitmq
    spec:
      containers:
        - name: rabbitmq
          image: rabbitmq:3-management
          ports:
            - name: rabbitmq
              containerPort: 5672
      restartPolicy: Always