apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: myboot2
  name: myboot2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myboot2
  template:
    metadata:
      labels:
        app: myboot2
    spec:
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - topologyKey: kubernetes.io/hostname
            labelSelector: 
              matchExpressions:
              - key: app
                operator: In
                values:
                - myboot
      containers:
      - name: myboot
        image: quay.io/rhdevelopers/myboot:v1
        ports:
          - containerPort: 8080