<p>when I create the Kubernetes Job by a job yaml file, and I have this error message:</p>

<p>Job in version \"v1\" cannot be handled as a Job: [pos 196]: json: expect char '\"' but got char '{'</p>

<p><strong>Anyone know why? Thanks!</strong></p>

<p>File job.yml:</p>

<p><code>
apiVersion: batch/v1
kind: Job
metadata:
  name: pi
  labels:
    name: 09996c3d-cb13-41b0-94a6-b8492d981de5
spec:
  completions: 1
  template:
    metadata:
      name: pi
      labels:
        name: 09996c3d-cb13-41b0-94a6-b8492d981de5
    spec:
      containers:
      - name: pi
        image: perl
        # command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
        env:
        - name: FUNCTIONGRAPH
          value: reqJsonBody
      restartPolicy: OnFailure
</code> </p>

<p>The above file perfectly creates a job for me. I am using minikube version
<code>minikube version: v0.23.0</code> and kubectl version <code>1.8</code></p>

<p>When I run the command <code>kubectl create -f job.yaml</code> , output is as follows.</p>

<pre><code>[pgarg@localhost]$ kubectl create -f job.yaml 
job "pi" created

[pgarg@localhost]$ oc get pods
NAME       READY     STATUS      RESTARTS   AGE
pi-r6xsm   0/1       Completed   0          23s

[pgarg@localhost]$ oc logs pi-r6xsm

Loading DB routines from perl5db.pl version 1.51
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(-e:1):   0
  DB&lt;1&gt;
</code></pre>

<p>And when I run the same yaml after removing that comment in container's command line. It perfectly prints the value of <code>pi</code> upto 2000 decimal digit.</p>

<p>I suggest that you upgrade to latest version of minikube if you're not yet on it, or provide some more details.</p>
