apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-server
spec:
  selector:
    matchLabels:
      app: web-store
  replicas: 3
  template:
    metadata:
      labels:
        app: web-store
    spec:
      topologySpreadConstraints:
      - maxSkew: 1
        topologyKey: lifecycle
        whenUnsatisfiable: DoNotSchedule
        labelSelector:
          matchLabels:
            app: web-store
      containers:
      - name: web-app
        image: k8s.gcr.io/pause:2.0