---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: guestbook
  labels:
    app: guestbook
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  selector:
    matchLabels:
      app: guestbook
  template:
    metadata:
      labels:
        app: guestbook
    spec:
      containers:
      - name: guestbook-nginx
        image: docker.io/laimison/guestbook-nginx:v18
        ports:
        - name: http-server
          containerPort: 80
        readinessProbe:
          httpGet:
            path: "/"
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 5
          successThreshold: 1
      - name: guestbook
        image: docker.io/laimison/guestbook:v15
        ports:
        - name: http-server
          containerPort: 3000
