error when creating “deployment.yaml”: Deployment in version “v1” cannot be handled as a Deployment

Since this is the top result of the search, I thought I should add another case when this can occur. In my case, it was coming because there was no double quote on numeric env. var. Log did provide a subtle hint, but it was not very helpful.


..., bigger context ...|c-server-service"},{"name":"SERVER_PORT","value":80}]

Env variable – the value of SERVER_PORT needs to be in double quote.

  - name: SERVER_HOST
    value: grpc-server-service
  - name: SERVER_PORT
    value: "80"

Kubernetes issue for reference.

Leave a Comment