Answers: <p>kubernetes is picky and case-sensitive:</p>
  
  <p><code>kind: Pod</code></p>
  
  <p>should do it.</p>
  
  <p>Also, <code>spec</code> should not be in <code>metadata</code>:</p>
  
  <pre><code>apiVersion: v1
  kind: Pod
  metadata:
    name: Testing
  spec:
    containers:
    - name: mysql
      image: mysql
      imagePullPolicy: Always
      command: ["echo", "SUCCESS"]
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-09T18:43:56.717Z
Answers: 2019-12-09T18:43:56.717Z
Answers: Matthew
Body: <p>I have following <code>yaml</code> file:</p>
  
  <pre><code>---
  apiVersion: v1
  kind: pod
  metadata:
      name: Tesing_for_Image_pull.pod 
      spec:
          containers:
          - name: mysql 
            image: mysql 
            imagePullPolicy: Always 
            command: ["echo", "SUCCESS"]  
  </code></pre>
  
  <p>When I use <code>kubectl create -f Tesing_for_Image_pull.yaml</code> , I get the following error:</p>
  
  <pre><code>error: error validating "Tesing_for_Image_pull.yaml": error validating data: couldn't find type: v1.pod; if you choose to ignore these errors, turn validation off with --validate=false
  </code></pre>
  
  <p>How can I solve my problem?</p>
  
Tags: <yaml><kubectl>
Title: error validating data: couldn't find type
UserDisplayName: PersianGulf
ThreadText: # error validating data: couldn't find type
  
  (Asked by: username_0 on 2019-12-09)
  
  I have following `yaml` file:
  
  ```
  ---
  apiVersion: v1
  kind: pod
  metadata:
      name: Tesing_for_Image_pull.pod 
      spec:
          containers:
          - name: mysql 
            image: mysql 
            imagePullPolicy: Always 
            command: ["echo", "SUCCESS"]  
  
  ```
  
  When I use `kubectl create -f Tesing_for_Image_pull.yaml` , I get the following error:
  
  ```
  error: error validating "Tesing_for_Image_pull.yaml": error validating data: couldn't find type: v1.pod; if you choose to ignore these errors, turn validation off with --validate=false
  
  ```
  
  How can I solve my problem?
  
  **Tags:** yaml, kubectl
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-09. Score: 1 | Accepted answer
  
  kubernetes is picky and case-sensitive:
  
  `kind: Pod`
  
  should do it.
  
  Also, `spec` should not be in `metadata`:
  
  ```
  apiVersion: v1
  kind: Pod
  metadata:
    name: Testing
  spec:
    containers:
    - name: mysql
      image: mysql
      imagePullPolicy: Always
      command: ["echo", "SUCCESS"]
  
  ```
  
  
  ---
  
  