apiVersion: apps/v1
kind: Deployment
metadata:
  name: flask-sample-deployment
  labels:
    app: flask-sample-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: flask-sample
  template:
    metadata:
      labels:
        app: flask-sample
    spec:
      containers:
        - name: flask-sample
          image: skilfulll1/flask-sample
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
          ports:
            - name: flask-http
              containerPort: 5000
          livenessProbe:
              httpGet:
                path: /
                port: flask-http
              initialDelaySeconds: 15
              timeoutSeconds: 30
          readinessProbe:
              httpGet:
                path: /
                port: flask-http
              initialDelaySeconds: 15
              timeoutSeconds: 30


# ---

# kind: Service
# apiVersion: v1
# metadata:
#   name:  flask-sample-deployment-service
# spec:
#   selector:
#     app: flask-sample-deployment
#   type:  NodePort
#   ports:
#   - name:  name-of-the-port
#     port:  5000
#     targetPort:  flask-http