apiVersion: apps/v1
kind: Deployment
metadata:
  name: pluto-deployment
  labels:
    app: pluto
spec:
  replicas: 2
  selector:
    matchLabels:
      app: pluto
  template:
    metadata:
      labels:
        app: pluto
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - pluto
            topologyKey: "kubernetes.io/hostname"
      containers:
      - name: pluto-latest
        image: registry.digitalocean.com/pluto-docker-images/pluto
        ports:
        - containerPort: 1234
