apiVersion: apps/v1
kind: Deployment
metadata:
  name: example
  labels:
    app: example
spec:
  replicas: 2
  selector:
    matchLabels:
      app: example
  template:
    metadata:
      labels:
        app: example
      annotations:
        k8s.v1.cni.cncf.io/mynetworks: vxlan1 #,macvlan3
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
                      - example
              topologyKey: "kubernetes.io/hostname"
      containers:
        - name: example
          image: busybox
          command:
            - sleep
            - "1000000"
          volumeMounts:
            - mountPath: /var/multus
              name: multus
      volumes:
        - hostPath:
            path: /root/multus
          name: multus
