how to convert all kubernetes ingress yamls to use API version networking.k8s.io/v1
It's not that difficult rewrite it by hand, for example:
apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: frontend annotations: kubernetes.io/ingress.class: "ing-class1"spec: rules: - host: frontend.com http: paths: - backend: service: name: frontend port: number: 80 path: /web-frontend/frontend.php pathType: Exact
May be you got an answer but it may helpful to others in future.Following configuration is worked for me.
apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: ingress-srv annotations: kubernetes.io/ingress.class: "nginx"spec: rules: - host: addtest.com http: paths: - path: /add pathType: Prefix backend: service: name: add-srv port: number: 4000
Instead of converting, it could be easier to write it from scratch, using the new schema which can be found in https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource.I rewrote mine, it works.Hope it's helpful.