Skip to content

Conversation

@tebaly
Copy link

@tebaly tebaly commented Nov 3, 2021

Ingress Resource Changes 1.19
Ingress resource moved out of beta in v1.19. This is a good time to modernize Ingress resources. We thought that the ingress.class annotation would go away but it cannot yet.

In v1.19 Ingress API is now networking.k8s.io/v1. All Ingress resources should migrate to this before v1.22.

The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress will no longer be served in v1.22.
API versions and resources are being automatically mutated in 1.19. While your manifest may say extensions/v1beta1, if you query the cluster the resource will report as networking.k8s.io/v1 and be in the new format.
The most simplistic way to modernize your resources is to use the automatically mutated version from the cluster. This is a starting point and is basic compatibility only.
Important: New spec.ingressClassName field is not ready for use!
In GKE 1.19 the Ingress class annotation is still required: kubernetes.io/ingress.class: nginx
This is required because the GKE built-in GCE ingress does not honor the new spec.ingressClassName field, it only honors the old annotation.
When new Ingresses are created, if both the class field and annotation are set, an error will be returned.
Thus we must stay with the annotation for now.
Ingress GCE reference: kubernetes/ingress-gce#1301
Ingress NGINX and GCE ingress have not yet updated their documentation for this new Ingress version so all this can be somewhat confusing.

closes/fixes #748


  • I've made sure the Changelog.md will remain up-to-date after this PR is merged.

Ingress Resource Changes 1.19
Ingress resource moved out of beta in v1.19. This is a good time to modernize Ingress resources. We thought that the ingress.class annotation would go away but it cannot yet.

In v1.19 Ingress API is now networking.k8s.io/v1. All Ingress resources should migrate to this before v1.22.

The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress will no longer be served in v1.22.
API versions and resources are being automatically mutated in 1.19. While your manifest may say extensions/v1beta1, if you query the cluster the resource will report as networking.k8s.io/v1 and be in the new format.
The most simplistic way to modernize your resources is to use the automatically mutated version from the cluster. This is a starting point and is basic compatibility only.
Important: New spec.ingressClassName field is not ready for use!
In GKE 1.19 the Ingress class annotation is still required: kubernetes.io/ingress.class: nginx
This is required because the GKE built-in GCE ingress does not honor the new spec.ingressClassName field, it only honors the old annotation.
When new Ingresses are created, if both the class field and annotation are set, an error will be returned.
Thus we must stay with the annotation for now.
Ingress GCE reference: kubernetes/ingress-gce#1301
Ingress NGINX and GCE ingress have not yet updated their documentation for this new Ingress version so all this can be somewhat confusing.
Copy link
Collaborator

@cndoit18 cndoit18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution.

@cndoit18
Copy link
Collaborator

cndoit18 commented Nov 4, 2021

There are two same PRs that I observed that you initiated first, can you integrate the two PRs

@TheMeier
Copy link

TheMeier commented Nov 4, 2021

Important: New spec.ingressClassName field is not ready for use!
In GKE 1.19 the Ingress class annotation is still required: kubernetes.io/ingress.class: nginx
This is required because the GKE built-in GCE ingress does not honor the new spec.ingressClassName field, it only honors the old annotation.

I'm not sure this is true. I only find this as source for the information: https://wiki.cac.washington.edu/display/MCI/Ingress+Resource+Changes+Kubernetes+1.19 not mentioning any primary source.
In any way even if it was true and you can use it only with default ingress class or the annotation on GKE it must be possible to set ingressClassName for anyone else (not using GKE).

Please feel free to incorporate my changes from #750

@cndoit18
Copy link
Collaborator

cndoit18 commented Nov 4, 2021

The changes have been merged, close this pr.
Thank you very much for your contribution.

@cndoit18 cndoit18 closed this Nov 4, 2021
@rthamrin
Copy link

rthamrin commented Dec 2, 2021

I am sorry, I still don't get it what does it mean? my load balancer is not working because of this update. now I'm confusing

mine is working fine with this before

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resources
  namespace: ingress
spec:
  ingressClassResource: nginx

@cndoit18
Copy link
Collaborator

cndoit18 commented Dec 2, 2021

I am sorry, I still don't get it what does it mean? my load balancer is not working because of this update. now I'm confusing

mine is working fine with this before

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resources
  namespace: ingress
spec:
  ingressClassResource: nginx

Hi, what is your Kubernetes version?
Did you create this ingress yourself?

@rthamrin
Copy link

rthamrin commented Dec 2, 2021

I am sorry, I still don't get it what does it mean? my load balancer is not working because of this update. now I'm confusing
mine is working fine with this before

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resources
  namespace: ingress
spec:
  ingressClassName: nginx

Did you create this ingress yourself?

I posted wrong.

it supposed to

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resources
  namespace: ingress
spec:
  ingressClassName: nginx

but also not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingress extensions v1beta1 not supported

4 participants