Пример манифеста для создания конфигмапа, деплоймента и сервиса для RabbitMQ
manifest.yml
apiVersion: v1 kind: ConfigMap metadata: name: rabbitmq-config namespace: staging labels: app: rabbitmq data: RABBITMQ_DEFAULT_USER: "user" RABBITMQ_DEFAULT_PASS: "password" RABBITMQ_DEFAULT_VHOST: "vhost" --- apiVersion: apps/v1 kind: Deployment metadata: name: rabbitmq namespace: staging labels: app: rabbitmq-app spec: replicas: 1 selector: matchLabels: app: rabbitmq-app strategy: type: RollingUpdate progressDeadlineSeconds: 300 template: metadata: labels: app: rabbitmq-app spec: containers: - image: rabbitmq:3 name: rabbitmq imagePullPolicy: "IfNotPresent" envFrom: - configMapRef: name: rabbitmq-config ports: - containerPort: 5672 volumeMounts: - mountPath: /var/lib/rabbitmq subPath: data/rabbitmq name: persistent-storage volumes: - name: persistent-storage persistentVolumeClaim: claimName: persistent-storage --- apiVersion: v1 kind: Service metadata: name: rabbitmq-svc namespace: staging spec: ports: - port: 5672 targetPort: 5672 selector: app: rabbitmq-app