Hello M T, ABHISHEK
As per https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingressclass-v122, you are right, networking.k8s.io/v1 was introduced in 1.19 and no longer served as of 1.22
Beside the new API version, there are some changes in the fields. In the networking.k8s.io/v1beta1 version, the serviceName and servicePort fields are used to specify the backend service, while in the networking.k8s.io/v1 version, the service field is used, which includes the service name and port. Additionally, in the networking.k8s.io/v1 version, the pathType field is used to specify the type of path matching, which can be Prefix, Exact, or ImplementationSpecific.
Here's an example of an Ingress resource using the networking.k8s.io/v1beta1 API:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
backend:
serviceName: example-service
servicePort: 80
Here's an example of the same Ingress resource using the networking.k8s.io/v1 API:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
name: http
You may want to take a look at these fields and make sure they are set correctly after the change you performed.
Additionally, please note Kubernetes version 1.20 is no longer support in AKS for a long period. As per https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?tabs=azure-cli#what-does-outside-of-support-mean, "AKS doesn't make any runtime or other guarantees for clusters outside of the supported versions list."
I would suggest you upgrade to a support Kubernetes version.
I hope this is helpful. If any clarification needed, let me know and I will do my best to answer.
Please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.
Thank you!