<p>In my firm our Kubernetes Cluster was recently updated to 1.22+ and we are using AKS. So I had to change the manifest of our ingress yaml file which was using : networking.k8s.io/v1beta1, to be compliant to the new apiVersion : networking.k8s.io/v1</p>
<p>This is the earlier manifest for the ingress file :</p>
<pre><code>{{- if .Values.ingress.enabled -}}
{{- $fullName := include &quot;amroingress.fullname&quot; . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare &quot;&gt;=1.14-0&quot; .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
  name: {{ $fullName }}
  labels:
    {{- include &quot;amroingress.labels&quot; . | nindent 4 }}
  {{- with .Values.ingress.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  {{- if .Values.ingress.tls }}
  tls:
    {{- range .Values.ingress.tls }}
    - hosts:
        {{- range .hosts }}
        - {{ . | quote }}
        {{- end }}
      secretName: {{ .secretName }}
    {{- end }}
  {{- end }}
  rules:
    {{- range .Values.ingress.hosts }}
    - host: {{ .host | quote }}
      http:
        paths:
          #{{- range .paths }}
          #- path: {{ . }}
          #  backend:
          #    serviceName: {{ $fullName }}
          #    servicePort: {{ $svcPort }}
          #{{- end }}
          - path: /callista/?(.*)
            backend:
              serviceName: amro-amroingress
              servicePort: 8080
    {{- end }}
  {{- end }}
</code></pre>
<p>and after my changes it looks like this:</p>
<pre><code>{{- if .Values.ingress.enabled -}}
{{- $fullName := include &quot;amroingress.fullname&quot; . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
  name: {{ include &quot;amroingress.fullname&quot; . }}
  labels:
    {{- include &quot;amroingress.labels&quot; . | nindent 4 }}
  {{- with .Values.ingress.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  {{- if .Values.ingress.tls }}
  tls:
    {{- range .Values.ingress.tls }}
    - hosts:
        {{- range .hosts }}
        - {{ . | quote }}
        {{- end }}
      secretName: {{ .secretName }}
    {{- end }}
  {{- end }}
  rules:
    {{- range .Values.ingress.hosts }}
    - host: {{ .host | quote }}
      http:
        paths:
          {{- range .paths }}
          - path: /callista/?(.*)
            pathType: Prefix
            backend:
              service:
                name: amro-amroingres
                port: 
                  number: 8080
    {{- end }}
  {{- end }}

</code></pre>
<p>But, after I made the changes and tried to deploy using helm, I receive this error:
<code>Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) for this kubernetes version and it is therefore unable to build the kubernetes objects for performing the diff. error from kubernetes: unable to recognize &quot;&quot;: no matches for kind &quot;Ingress&quot; in version &quot;networking.k8s.io/v1beta1&quot;</code></p>
<p>I am not sure why this error occurs even though the ingress manifest has changed and I have been stuck at this for a few days now. I am new to kubernetes and ingress in general, any help will be massively appreciated.</p>

Saurav Saha
<p>The API resources on the Control plane are upgreaded but the ones in helm stored manifest (within a Secret resource) are old.</p>
<p>Here is the resolution:</p>
<pre><code>$ helm plugin install https://github.com/helm/helm-mapkubeapis 
$ helm mapkubeapis my-release-name --namespace ns
</code></pre>
<p>After this run a <code>helm upgrade</code> again.</p>
