<p>I'm trying to install emissary-ingress using the <a href="https://www.getambassador.io/docs/emissary/latest/topics/install/install-ambassador-oss/" rel="nofollow noreferrer">instructions here</a>.</p>
<p>It started failing with error <code>no matches for kind &quot;CustomResourceDefinition&quot; in version &quot;apiextensions.k8s.io/v1beta&quot;</code>. I searched and found an <a href="https://stackoverflow.com/a/69054743/4980703">answer</a> on Stack Overflow which said to update <code>apiextensions.k8s.io/v1beta1</code> to <code>apiextensions.k8s.io/v1</code> which I did.
It also asked to use the <code>admissionregistration.k8s.io/v1</code> which my kubectl already uses.</p>
<p>When I run the <code>kubectl apply -f filename.yml</code> command, the above error was gone and a new error started popping in with error: <code>error validating data: ValidationError(CustomResourceDefinition.spec): unknown field &quot;validation&quot; in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec;</code></p>
<p>What should I do next?</p>
<p>My kubectl version - Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.4&quot;, GitCommit:&quot;3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-08-11T18:16:05Z&quot;, GoVersion:&quot;go1.16.7&quot;, Compiler:&quot;gc&quot;, Platform:&quot;windows/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;22&quot;, GitVersion:&quot;v1.22.2&quot;, GitCommit:&quot;8b5a19147530eaac9476b0ab82980b4088bbc1b2&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-09-15T21:32:41Z&quot;, GoVersion:&quot;go1.16.8&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}</p>
<p>minikube version - minikube version: v1.23.2
commit: 0a0ad764652082477c00d51d2475284b5d39ceed</p>
<p>EDIT:</p>
<p>The custom resource definition yml file: <a href="https://www.getambassador.io/yaml/ambassador/ambassador-crds.yaml" rel="nofollow noreferrer">here</a></p>
<p>The rbac yml file: <a href="https://www.getambassador.io/yaml/ambassador/ambassador-rbac.yaml" rel="nofollow noreferrer">here</a></p>

Kartikeya Gokhale
<p>The <code>validation</code> field was officially deprecated in <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122" rel="nofollow noreferrer">apiextensions.k8s.io/v1</a>.
According to the official kubernetes documentation, you should use <code>schema</code> as a substitution for <code>validation.</code>
Here is a SAMPLE code using <code>schema</code> instead of <code>validation:</code></p>
<pre><code>apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: crontabs.stable.example.com
spec:
  group: stable.example.com
  versions:
    - name: v1
      served: true
      storage: true
---&gt;  schema:  &lt;---
        # openAPIV3Schema is the schema for validating custom objects.
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                cronSpec:
                  type: string
                  pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'
                image:
                  type: string
                replicas:
                  type: integer
                  minimum: 1
                  maximum: 10
</code></pre>
