<p>Folks, when running the following kubectl command:</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: openvpn-data-claim
  namespace: openvpn
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>

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

<p>kubectl version</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.9-gke.24", GitCommit:"39e41a8d6b7221b901a95d3af358dea6994b4a40", GitTreeState:"clean", BuildDate:"2020-02-29T01:24:35Z", GoVersion:"go1.12.12b4", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

Cmag
<ul>
<li>This answer is is an addition to @Cmag answer and
my intention is to provide more insights about this issue to help the community.</li>
</ul>
<p>According to Kubernetes <strong><a href="https://kubernetes.io/docs/setup/release/version-skew-policy/#kubectl" rel="nofollow noreferrer">Version Skew Policy</a>:</strong></p>
<blockquote>
<p><code>kubectl</code> is supported within one minor version (older or newer) of <code>kube-apiserver</code>.</p>
<p><strong>IF</strong> <code>kube-apiserver</code> is at <strong>1.15</strong>: <code>kubectl</code> is supported at <strong>1.16</strong>, <strong>1.15</strong>, and <strong>1.14</strong>.</p>
<p><strong>Note:</strong> If version skew exists between kube-apiserver instances in an HA cluster, for example <code>kube-apiserver</code> instances are at <strong>1.15</strong> and <strong>1.14</strong>, <code>kubectl</code> will support only <strong>1.15</strong> and <strong>1.14</strong> since any other versions would be more than one minor version skewed.</p>
</blockquote>
<ul>
<li>Each update of kubernetes has many components that are added, changed, moved, deprecated or removed. Here is the <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.15.md" rel="nofollow noreferrer">Kubernetes Changelog of version 1.15</a>.</li>
</ul>
<p><strong>Even running a much newer client versions may give you some issues</strong></p>
<ul>
<li>In K8s 1.10 the <code>kubectl run</code> had a default behavior of creating deployments:</li>
</ul>
<pre><code>❯ ./kubectl-110 run ubuntu --image=ubuntu          
deployment.apps &quot;ubuntu&quot; created
</code></pre>
<ul>
<li>Starting on 1.12 the <code>kubectl run</code> was <a href="https://github.com/kubernetes/kubernetes/pull/68132" rel="nofollow noreferrer">deprecated</a> to all generators except pods, here is an example with <strong>kubectl 1.16</strong>:</li>
</ul>
<pre><code>❯ ./kubectl-116 run ubuntu --image=ubuntu --dry-run
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
deployment.apps/ubuntu created (dry run)
</code></pre>
<ul>
<li>Besides the warning, it still work as intended, but it <a href="https://github.com/kubernetes/kubernetes/pull/87077" rel="nofollow noreferrer">changed</a> in K8s 1.18 client:</li>
</ul>
<pre><code>❯ ./kubectl-118 version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;18&quot;, GitVersion:&quot;v1.18.2&quot;, GitCommit:&quot;52c56ce7a8272c798dbc29846288d7cd9fbae032&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-04-16T11:56:40Z&quot;, GoVersion:&quot;go1.13.9&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;15+&quot;, GitVersion:&quot;v1.15.9-gke.24&quot;, GitCommit:&quot;39e41a8d6b7221b901a95d3af358dea6994b4a40&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-02-29T01:24:35Z&quot;, GoVersion:&quot;go1.12.12b4&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}

$ kubectl run --generator=deployment/apps.v1 ubuntu --image=ubuntu --dry-run=client
Flag --generator has been deprecated, has no effect and will be removed in the future.
pod/ubuntu created (dry run)
</code></pre>
<p>It ignored the flag and created only a pod. That flag is supported by kubernetes 1.15 as we saw in the test, but the kubectl 1.18 had significant changes that did not allowed running it.</p>
<ul>
<li>This is a simple example to illustrate the importance to follow the skew policy on Kubernetes, it can save a lot of troubleshooting time in the future!</li>
</ul>
