<p>I'm running jobs on EKS. After trying to start a job with invalid yaml, it doesn't seem to let go of the bad yaml and keeps giving me the same error message even after correcting the file.</p>

<ol>
<li>I successfully ran a job.</li>
<li>I added an environment variable with a boolean value in the <code>env</code> section, which raised this error:

<ul>
<li><code>Error from server (BadRequest): error when creating "k8s/jobs/create_csv.yaml": Job in version "v1" cannot be handled as a Job: v1.Job: Spec: v1.JobSpec: Template: v1.PodTemplateSpec: Spec: v1.PodSpec: Containers: []v1.Container: v1.Container: Env: []v1.EnvVar: v1.EnvVar: Value: ReadString: expects " or n, but found t, error found in #10 byte of ...|,"value":true},{"nam|..., bigger context ...|oduction"},{"name":"RAILS_LOG_TO_STDOUT","value":true},{"name":"AWS_REGION","value":"us-east-1"},{"n|...</code></li>
</ul></li>
<li>I changed the value to be a string <code>yes</code>, but the error message continues to show the original, bad yaml.</li>
<li>No jobs show up in <code>kubectl get jobs --all-namespaces</code>

<ul>
<li>So I don't know where this old yaml would be hiding.</li>
</ul></li>
</ol>

<p>I thought this might be because I didn't have <code>imagePullPolicy</code> set to <code>Always</code>, but it happens even if I run the <code>kubectl</code> command locally.</p>

<p>Below is my job definition file:</p>

<pre><code>apiVersion: batch/v1
kind: Job
metadata:
  generateName: create-csv-
  labels:
    transformer: AR
spec:
  template:
    spec:
      containers:
      - name: create-csv
        image: my-image:latest
        imagePullPolicy: Always
        command: ["bin/rails",  "create_csv"]
        env:
          - name: RAILS_ENV
            value: production
          - name: RAILS_LOG_TO_STDOUT
            value: yes
          - name: AWS_REGION
            value: us-east-1
          - name: AWS_ACCESS_KEY_ID
            valueFrom:
              secretKeyRef:
                name: aws
                key: aws_access_key_id
          - name: AWS_SECRET_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                name: aws
                key: aws_secret_access_key
      restartPolicy: OnFailure
  backoffLimit: 6
</code></pre>

<p>"yes" must be quoted in yaml or it gets treated as a keyword that means a boolean true</p>

<p>Try this:</p>

<pre><code>value: "yes"
</code></pre>
