apiVersion: apps/v1
kind: Deployment
metadata:
  name: nerthus
spec:
  selector:
    matchLabels:
      app: nerthus
  replicas: 4
  template:
    metadata:
      labels:
        app: nerthus
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app 
                operator: In
                values:
                -  nerthus
            topologyKey: "kubernetes.io/hostname"
      containers:
      - name: nerthus-container
        image: k8s.gcr.io/pause:2.0
        resources:
          requests:
            cpu: "300m"
            memory: "1200M"
