apiVersion: v1
kind: Pod
metadata:
  name: nginx-spot
  labels:
    app: nginx
spec:
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: eks.amazonaws.com/capacityType
            operator: In
            values:
            - SPOT
  containers:
  - name: nginx
    image: nginx:1.14.2
    ports:
    - containerPort: 80
