<p>I'm working <a href="https://github.com/kubernetes/kubernetes/issues/23864" rel="nofollow">to add port range support to kubernetes</a> so I need to modify the API and schemas to support a new parameter: portrange instead of the traditional port. To do it, I've follow <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api_changes.md#edit-typesgo" rel="nofollow">the official guideline</a> but yet, I'm blocked because when I try to execute:</p>

<pre><code>cluster/kubectl.sh create -f restcomm_rc_range.yml
</code></pre>

<p>returns:</p>

<pre><code>error validating "restcomm_rc_range.yml": error validating data: API version "ranges/v2 alpha1" isn't supported, only supports API versions ["extensions/v1beta1" "authentication.k8s.io/v1beta1" "v1" "apps/v1alpha1" "autoscaling/v1" "metrics/v1alpha1" "policy/v1alpha1" "authorization.k8s.io/v1beta1" "batch/v1" "batch/v2alpha1" "componentconfig/v1alpha1"]; if you choose to ignore these errors, turn validation off with --validate=false
</code></pre>

<p>I've previously executed:</p>

<pre><code>./hack/update-all.sh -a &amp;&amp; ./hack/build-go.sh
./hack/local-up-cluster.sh
</code></pre>

<p>And I've <a href="https://github.com/kubernetes/kubernetes/compare/master...antonmry:portrange2%232?expand=1" rel="nofollow">modified all the files</a>, but clearly I'm missing some step here to register the API in the API Server. Any guidance about how to do it? Is this solution suitable for the issue?</p>

<p>You need to register the API in the APIServer code.  See:</p>

<p><a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/master/master.go#L245" rel="nofollow">https://github.com/kubernetes/kubernetes/blob/master/pkg/master/master.go#L245</a></p>

<p>for an example for v1beta1.</p>
