apiVersion: apps/v1 
kind: Deployment
metadata:
  name: nag-deployment
spec:
  selector:
    matchLabels:
      app: devops-project
  replicas: 2 # tells deployment to run 2 pods matching the template
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1

  template:
    metadata:
      labels:
        app: devops-project
    spec:
      containers:
      - name: nag-devops-project
        image: nagendra464/simple-devops-image:1
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
