<p>I am creating namespace using <code>kubectl</code> with <code>yaml</code>. The following is my <code>yaml</code> configuration</p>

<pre><code>apiVersion: v1
kind: Namespace
metadata:
    name: "slackishapp"
    labels:
        name: "slackishapp"
</code></pre>

<p>But, when I run <code>kubectl create -f ./slackish-namespace-manifest.yaml</code>, I got an error like the following</p>

<pre><code>error: SchemaError(io.k8s.api.autoscaling.v2beta2.PodsMetricStatus): invalid object doesn't have additional properties.
</code></pre>

<p>What goes wrong on my <code>yaml</code>? I am reading about it on the <a href="https://kubernetes.io/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace" rel="noreferrer">documentation</a> as well. I don't see any difference with my configuration.</p>

Set Kyar Wa Lar
<p>There is nothing wrong with your yaml but I suspect you have the wrong version of kubectl. </p>

<p>kubectl needs to be within 1 minor from the cluster you are using as described <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/#before-you-begin" rel="noreferrer">here</a>.</p>

<p>You can check your versions with</p>

<pre><code>kubectl version
</code></pre>
