apiVersion: apps/v1
kind: Deployment
metadata:
  name: learn-kubernetes-app
  labels:
    app.kubernetes.io/component: web

spec:
  replicas: 1
  selector:
    matchLabels:
      app: learn-kubernetes-app
  template:
    metadata:
      labels:
        app: learn-kubernetes-app
        app.kubernetes.io/name: learn-kubernetes-app
        app.kubernetes.io/version: 0.0.5
        app.kubernetes.io/component: web

    spec:
      containers:
        - name: app
          image: mumarov/learn-kubernetes-app:0.0.5
          ports:
            - containerPort: 8080
          imagePullPolicy: Always

          livenessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 120
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            periodSeconds: 10

          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "256Mi"
              cpu: "250m"
