<p>I had the below YAML for my Ingress and it worked (and continues to work):</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  namespace: test-layer
annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: mylocalhost.com
      http:
        paths:
          - path: /
            backend:
              serviceName: test-app
              servicePort: 5000
</code></pre>
<p>However, it tells me that it's deprecated and I should change to using <code>networking.k8s.io/v1</code>. When I do that (see below) it throws an error.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-ingress
  namespace: test-layer
annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: mylocalhost.com
      http:
        paths:
          - path: /
            backend:
              serviceName: test-app
              servicePort: 5000
</code></pre>
<p><strong>ERROR</strong></p>
<pre><code>error: error validating &quot;test-ingress.yaml&quot;: 
  error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): 
    unknown field &quot;serviceName&quot; in io.k8s.api.networking.v1.IngressBackend, 
    ValidationError(Ingress.spec.rules[0].http.paths[0].backend): 
      unknown field &quot;servicePort&quot; in io.k8s.api.networking.v1.IngressBackend]; 
      if you choose to ignore these errors, turn validation off with --validate=false
</code></pre>
<p>Other than changing the API version, I made no other changes.</p>
<p><code>kubectl version</code> returns:</p>
<pre><code>Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot;, GitVersion:&quot;v1.19.0&quot;, GitCommit:&quot;e19964183377d0ec2052d1f1fa930c4d7575bd50&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-08-26T14:30:33Z&quot;, GoVersion:&quot;go1.15&quot;, Compiler:&quot;gc&quot;, Platform:&quot;windows/amd64&quot;}

Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot;, GitVersion:&quot;v1.19.0&quot;, GitCommit:&quot;e19964183377d0ec2052d1f1fa930c4d7575bd50&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-08-26T14:23:04Z&quot;, GoVersion:&quot;go1.15&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>

<p>I think that this <a href="https://github.com/kubernetes/kubernetes/pull/89778" rel="noreferrer">PR</a> contains the change you're asking about.</p>
<pre><code>`Ingress` and `IngressClass` resources have graduated to `networking.k8s.io/v1`. Ingress and IngressClass types in the `extensions/v1beta1` and `networking.k8s.io/v1beta1` API versions are deprecated and will no longer be served in 1.22+. Persisted objects can be accessed via the `networking.k8s.io/v1` API. Notable changes in v1 Ingress objects (v1beta1 field names are unchanged):
* `spec.backend` -&gt; `spec.defaultBackend`
* `serviceName` -&gt; `service.name`
* `servicePort` -&gt; `service.port.name` (for string values)
* `servicePort` -&gt; `service.port.number` (for numeric values)
* `pathType` no longer has a default value in v1; &quot;Exact&quot;, &quot;Prefix&quot;, or &quot;ImplementationSpecific&quot; must be specified
Other Ingress API updates:
* backends can now be resource or service backends
* `path` is no longer required to be a valid regular expression
</code></pre>
<p>If you look in the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="noreferrer">1.19 Ingress doc</a>, it looks like the new syntax would be:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          service:
            name: test
            port:
              number: 80
</code></pre>
<p>I unfortunately don't have a 1.19 cluster to test myself, but I think this is what you're running into.</p>
