<p>I am trying to add argocd ingress resources on my Azure Kubernetes Service (AKS)cluster. I follow this guide <a href="https://argoproj.github.io/argo-cd/operator-manual/ingress/#kubernetesingress-nginx" rel="nofollow noreferrer">https://argoproj.github.io/argo-cd/operator-manual/ingress/#kubernetesingress-nginx</a></p>
<p>when I apply ingress resource on Kubernetes AKS cluster. it gave this following error message. it is working on AKS kubernete cluster <code>v1.18.14</code></p>
<p>Anyone has met this same issue?</p>
<p>Cluster Environment:</p>
<pre><code>Client Version: v1.20.0
Server Version: v1.19.6
</code></pre>
<p>Error message</p>
<pre><code>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>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: argocd-server-http-ingress
  namespace: argocd
  annotations:
    kubernetes.io/ingress.class: &quot;nginx-internal&quot;
    nginx.ingress.kubernetes.io/force-ssl-redirect: &quot;true&quot;
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTP&quot;
spec:
  rules:
    - http:
        paths:
          - path: /argocd
            pathType: ImplementationSpecific
            backend:
              serviceName: argocd-server
              servicePort: http
      host: argocd.example.com
  tls:
    - hosts:
        - argocd.example.com
      secretName: argocd-secret # do not change, this is provided by Argo CD
</code></pre>

Xin Cai
<p>Please find below example ingress for <strong>1.19</strong> Kubernetes version</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>you can read more at : <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource</a></p>
<p>if you are running the <strong>Kubernetes</strong> version <strong>1.18</strong></p>
<p>example ingress will be something like</p>
<pre><code>apiVersion: &quot;networking.k8s.io/v1beta1&quot;
kind: &quot;Ingress&quot;
metadata:
  name: &quot;example-ingress&quot;
spec:
  ingressClassName: &quot;external-lb&quot;
  rules:
  - host: &quot;*.example.com&quot;
    http:
      paths:
      - path: &quot;/example&quot;
        pathType: &quot;Prefix&quot;
        backend:
          serviceName: &quot;example-service&quot;
          servicePort: 80
</code></pre>
<p>you can read more about the improvement in Kubernetes official blog : <a href="https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/" rel="noreferrer">https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/</a></p>
