<p>When creating a Job in kubernetes 1.6, the following error occurs:</p>

<pre><code>Error from server (BadRequest): error when creating "job.yaml": 
Job in version "v1" cannot be handled as a Job: [pos 217]: 
json: expect char '"' but got char '1'
</code></pre>

<p>The job.yaml in question is:</p>

<pre><code>apiVersion: batch/v1
kind: Job
metadata:
  name: sysbench-oltp
spec:
  template:
    metadata:
      name: sysbench-oltp
    spec:
      containers:
      - name: sysbench-oltp
        image: sysbench-oltp:1.0
        env:
        - name: OLTP_TABLE_SIZE
          value: 10000
        - name: DB_NAME
          value: "test"
        - name: DB_USER
          value: "test_user"
</code></pre>

<p>Any variations on the API do not seem to matter at all. Anybody have any idea of what the problem is?</p>

<p>Found the solution:</p>

<p>The JSON parser returns a rather unrelated error on a piece of the data in the environment variables:</p>

<pre><code>   env:
    - name: OLTP_TABLE_SIZE
      value: 10000
</code></pre>

<p>Should read:</p>

<pre><code>   env:
    - name: OLTP_TABLE_SIZE
      value: "10000"
</code></pre>

<p>After which all the parsing works as it should. </p>
