<p>I'm trying to run <code>kubectl -f pod.yaml</code> but getting this error. Any hint?</p>

<pre><code>error: error validating "/pod.yaml": error validating data: [ValidationError(Pod): unknown field "imagePullSecrets" in io.k8s.api.core.v1.Pod, ValidationError(Pod): unknown field "nodeSelector" in io.k8s.api.core.v1.Pod, ValidationError(Pod): unknown field "tasks" in io.k8s.api.core.v1.Pod]; if you choose to ignore these errors, turn validation off with --validate=false
</code></pre>

<p>pod.yaml:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: gpu-pod-10.0.1
  namespace: e6a5089f-8e9e-4647-abe3-b8d775079565
spec:
  containers:
  - name: main
    image: bded587f4604
  imagePullSecrets: ["testo", "awsecr-cred"]
  nodeSelector:
    kubernetes.io/hostname: 11-4730
tasks:
- name: traind
  command: et estimate -e v/lat/exent_sps/enet/default_sql.spec.txt -r /out
  completions: 1
  inputs:
    datasets:
    - name: poa
      version: 2018-
      mountPath: /in/0
</code></pre>

<p>You have an indentation error on your <code>pod.yaml</code> definition with <code>imagePullSecrets</code> and you need to specify the <code>- name:</code> for your <code>imagePullSecrets</code>. Should be something like this:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: gpu-test-test-pod-10.0.1.11-e8b74730
  namespace: test-e6a5089f-8e9e-4647-abe3-b8d775079565
spec:
  containers:
  - name: main
    image: test.io/tets/maglev-test-bded587f4604
  imagePullSecrets:
  - name: testawsecr-cred
...
</code></pre>

<p>Note that <code>imagePullSecrets:</code> is plural and an <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#podspec-v1-core" rel="nofollow noreferrer">array</a> so you can specify multiple credentials to multiple registries.</p>

<p>If you are using Docker you can also specify multiple credentials in <code>~/.docker/config.json</code>.</p>

<p>If you have the same credentials in <code>imagePullSecrets:</code> and configs in <code>~/.docker/config.json</code>, the credentials are merged. </p>
