---
apiVersion: apps/v1
kind: Deployment
metadata: # Блок метаданных деплоя
  name: post
  labels:
    app: reddit
    component: post
spec: # Блок спецификации деплоя
  replicas: 3
  selector:
    matchLabels:
      app: reddit
      component: post
  template: # Блок описания POD-ов
    metadata:
      name: post
      labels:
        app: reddit
        component: post
    spec:
      containers:
      - image: yunusovtr/post:latest
        name: post
        env:
        - name: POST_DATABASE_HOST
          value: comment-db
