I have the following yaml file:
---
apiVersion: v1
kind: pod
metadata:
name: Tesing_for_Image_pull -----------> 1
spec:
containers:
- name: mysql ------------------------> 2
image: mysql ----------> 3
imagePullPolicy: Always ------------->4
command: ["echo", "SUCCESS"] -------------------> 5
After running kubectl create -f my_yaml.yaml I get the following error:
error: error converting YAML to JSON: yaml: line 10: did not find expected key
UPDATE:
With yamllint I get the following error:
root@debian:~# yamllint my_yaml.yaml
my_yaml.yaml
8:9 error wrong indentation: expected 12 but found 8 (indentation)
11:41 error syntax error: expected <block end>, but found '<scalar>'
Where is my problem and how can I solve it?
-beforenamein line 8? And what is with all the------------->'s?