Confusion about networking.k8s.io/v1

1/17/2022

I am trying to use Ingress in my helm charts and am getting the error:

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"

Which is fine. The thing I am confused about is that I am not using v1beta1, rather I have upgraded everything to v1 since v1beta1 is now deprecated. Here is an example of one of the ingress charts:

<!-- language: lang-yaml -->
{{ if .Values.enableIngressAuth }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "nginx-ingress-name" . }}-auth-ingress
  namespace: {{ template "nginx-ingress-namespace" . }}
  annotations:
    kubernetes.io/ingress.class: "{{ template "nginx-ingress-class-name" . }}"
    nginx.ingress.kubernetes.io/use-regex: "true"
  labels:
    app: {{ template "nginx-ingress-name" . }}-auth
spec:
{{- if .Values.global.tls.enabled }}
  tls:
  - hosts:
    - {{ .Values.global.tls.domain | quote }}
{{- end }}
  rules:
  - http:
      paths:
      - path: /authorize(.*)
        pathType: Prefix
        backend:
          service:
            name: {{ template "nginx-ingress-name" . }}-auth
            port:
              number: 8000
{{- if .Values.global.tls.enabled }}
    host: {{ .Values.global.tls.domain | quote }}
{{- end }}
{{ end }}

(I have multiple ingress yamls and they all have been switched over to v1).

helm version: version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.17.3"}

kubectl version: Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.5", GitCommit:"5c99e2ac2ff9a3c549d9ca665e7bc05a3e18f07e", GitTreeState:"clean", BuildDate:"2021-12-16T08:32:32Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}

-- Johannas
kubernetes
kubernetes-helm
kubernetes-ingress
minikube

0 Answers