apiVersion: v1
kind: Secret
metadata:
  name: rabbitmq
  namespace: default
type: Opaque
data:
  RABBITMQ_PASSWORD: cmFiYml0bXE=
---
apiVersion: apps/v1
kind: Pod
metadata:
 name: nginx
spec:
  containers:
  - name: nginx
    image: nginx:latest
    env:
      - name: RABBITMQ_PASSWORD
        valueFrom:
          secretKeyRef:
            name: rabbitmq
            key: RABBITMQ_PASSWORD
