I am trying to add argocd ingress resources on my Azure Kubernetes Service (AKS)cluster. I follow this guide https://argoproj.github.io/argo-cd/operator-manual/ingress/#kubernetesingress-nginx
when I apply ingress resource on Kubernetes AKS cluster. it gave this following error message. it is working on AKS kubernete cluster v1.18.14
Anyone has met this same issue?
Cluster Environment:
Client Version: v1.20.0
Server Version: v1.19.6
Error message
error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "servicePort" in io.k8s.api.networking.v1.IngressBackend]; if you choose to ignore these errors, turn validation off with --validate=false
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server-http-ingress
namespace: argocd
annotations:
kubernetes.io/ingress.class: "nginx-internal"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
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
2
Answers
Please find below example ingress for 1.19 Kubernetes version
you can read more at : https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
if you are running the Kubernetes version 1.18
example ingress will be something like
you can read more about the improvement in Kubernetes official blog : https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
Try: apiVersion:
extensions/v1beta1
instead ofnetworking.k8s.io/v1