apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: dev
  labels:
    app: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  minReadySeconds: 10
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: phanikumary1995/nginx-eks-dev
#        image: phanikumary1995/nginx-eks
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 80
        - name: https
          containerPort: 443
        readinessProbe:
#          tcpSocket:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 10
          timeoutSeconds: 1
          periodSeconds: 5
          successThreshold: 1
        livenessProbe:
#          tcpSocket:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 10
          timeoutSeconds: 1
          periodSeconds: 2
          failureThreshold: 3
