---
apiVersion: v1
kind: Service
metadata:
  name: whoami1
  labels:
    run: whoami1
spec:
  ports:
  - port: 80
    protocol: TCP
  selector:
    run: whoami1
#  type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: whoami1
spec:
  selector:
    matchLabels:
      run: whoami1
  replicas: 2
  template:
    metadata:
      labels:
        run: whoami1
    spec:
#      affinity:
#        podAntiAffinity:
#          requiredDuringSchedulingIgnoredDuringExecution:
#          - labelSelector:
#              matchExpressions:
#              - key: app
#                operator: In
#                values:
#                - whoami
#            topologyKey: kubernetes.io/hostname
      containers:
      - name: whoami
        image: traefik/whoami
        ports:
        - containerPort: 80
