apiVersion: apps/v1
kind: Deployment
metadata:
  name: "tomcat"
  namespace: "tomcat"
spec:
  selector:
    matchLabels:
      app: "tomcat"
  replicas: 4
  template:
    metadata:
      labels:
        app: "tomcat"
    spec:
      containers:
      - image: tomcat:8.0
        imagePullPolicy: Always
        name: "tomcat"
        readinessProbe:
          httpGet:
            path: /sample
            port: 8080
            scheme: HTTP
        livenessProbe:
          httpGet:
            path: /sample
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 10
          timeoutSeconds: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
