kubernetes Job in version "v1" cannot be handled as a Job:

1/16/2019

I'm trying to create a migration but it's failing with the below error:

Error from server (BadRequest): error when creating "kubernetes/migration-job.yaml": Job in version "v1" cannot be handled as a Job: v1.Job: Spec: v1.JobSpec:

What is the cause of this error?

-- Chris Stryczynski
kubernetes

1 Answer

1/16/2019

The issue was to do with one of the yaml fields:

env:
  - name: DB_HOST
    value: "mysql"
  - name: DB_PORT
    value: 3306

3306 should be a string ("3306") instead...

-- Chris Stryczynski
Source: StackOverflow