<p>Getting below error while trying to create an ingress endpoint on k8s v1.26.3. i have created a k8s cluster using kops.</p>
<p>Error from server</p>
<blockquote>
<p>(BadRequest): error when creating &quot;ingress.yaml&quot;: Ingress in version
&quot;v1&quot; cannot be handled as a Ingress: strict decoding error: unknown
field &quot;spec.rules[0].http.paths[0].backend.serviceName&quot;, unknown field
&quot;spec.rules[0].http.paths[0].backend.servicePort&quot;</p>
</blockquote>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  labels:
    env: prod
    app: demo-ms
    layer: frontend
  name: prod-demo-ingress
  namespace: prod
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: demo.abc.in
      http:
        paths:
          - backend:
              serviceName: prod-demo-service
              servicePort: 8080
            path: /
~~~
</code></pre>

<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: prod-demo-ingress
  namespace: prod
  labels:
    env: prod
    app: demo-ms
    layer: frontend
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: demo.abc.in
      http:
        paths:
          - pathType: Prefix
            path: &quot;/&quot;
            backend:
              service:
                name: prod-demo-service
                port:
                  number: 8080
</code></pre>
