apiVersion: apps/v1
kind: Deployment
metadata:
  name: iperf3-client
  namespace: iperf3
spec:
  selector:
    matchLabels:
      app: iperf3-client
  replicas: 1
  template:
    metadata:
      labels:
        app: iperf3-client
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - iperf3-server
            topologyKey: kubernetes.io/hostname
      containers:
        - name: iperf3-client
          image: quay.io/ypery/iperf3-client-python
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
