apiVersion: v1
kind: Pod
metadata:
  name: kubernetes-nodeaffinity-pod
spec:
  containers:
  - name: kubernetes-nodeaffinity-pod
    image: arisu1000/simple-container-app:latest
    ports:
    - containerPort: 8080
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: beta.kubernetes.io/os
            operator: In
            values:
            - linux
            - window
          - key: disktype
            operator: Exists
          # - key: core
            # operator: Gt  
            # values: 
            # - "4"
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 10
        preference:
          matchExpressions:
          - key: kubernetes.io/hostname
            operator: In
            values:
            - worker-node01