<p>I create a <code>deployment.yaml</code> to create deployment of kubernetes.</p>

<p>Here is my tries:</p>

<p><code>apiVersion: apps/v1</code></p>

<p>get <code>error: unable to recognize "./slate-master/deployment.yaml": no matches for kind "Deployment" in version "apps/v1"</code></p>

<p><code>apiVersion: extensions/v1beta1</code> and <code>apiVersion: apps/v1beta1</code></p>

<p>both of them, get <code>Error from server (BadRequest): error when creating "./slate-master/deployment.yaml": Deployment in version "v1beta1" cannot be handled as a Deployment: v1beta1.Deployment: ...</code></p>

<p>here is my kubernetes version: </p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-05-12T04:12:12Z", GoVersion:"go1.9.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.7", GitCommit:"b30876a5539f09684ff9fde266fda10b37738c9c", GitTreeState:"clean", BuildDate:"2018-01-16T21:52:38Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>So, why kubernetes create deployment failed?</p>

Lin Du
<p>Check in "env" section, for apiVersion: </p>

<pre><code>apps/v1
apps/v1beta1
apps/v1beta2
</code></pre>

<p>All the env variables should be a string, add the <code>quote</code>: e.g </p>

<pre><code>- name: POSTGRES_PORT
  value: {{ .Values.db.env.POSTGRES_PORT | quote }}
</code></pre>
