apiVersion: v1
kind: Pod
spec:
  containers:
    - name: spark
      image: sasnouskikh/livy-spark:0.8.0-incubating-spark_3.0.1_2.12-hadoop_3.2.0_cloud
      imagePullPolicy: Always
      volumeMounts:
        - mountPath: "/mnt/spotshare"
          name: my-pv
  tolerations:
  - key: "kubernetes.azure.com/scalesetpriority"
    operator: "Equal"
    value: "spot"
    effect: "NoSchedule"
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: "kubernetes.azure.com/scalesetpriority"
            operator: In
            values:
            - "spot"
  volumes:
  - name: my-pv
    persistentVolumeClaim:
      claimName: azurefile