-
Notifications
You must be signed in to change notification settings - Fork 39.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expecting apiVersion - networking.k8s.io/v1 instead of extensions/v1beta1 #94761
Comments
/sig network These SIGs are my best guesses for this issue. Please comment 🤖 I am a bot run by vllry. 👩🔬 |
/triage unresolved Comment 🤖 I am a bot run by vllry. 👩🔬 |
This is working as expected. When you create an ingress object, it can be read via any version (the server handles converting into the requested version). When an ambiguous request is made, kubectl searches the discovery docs returned by the server to find the first group/version that contains the specified resource. For compatibility reasons, extensions/v1beta1 has historically been preferred over all other api versions. Now that ingress is the only resource remaining in that group, and is deprecated and has a GA replacement, 1.20 will drop it in priority so that If you want to read a specific version, you can qualify the get request (like |
Any alternative to read the new ingress explanation details from the kubectl explain command. With the |
This should do what you want:
|
Might be the reason, I am performing this in the k8s v1.18. Right now I tried in the v1.19. It worked. |
Thats not how it should work Nobody expects such behavior, for example, helmreleases got an update conflict on a same apiversion upon a change
|
Same issue here. that's not a logical behavior. Once a version (1.16) does not serve an api version, I do expect the new one (networking) being the default one when exporting. Why would I export a version which is already deprecated for this specific version of the cluster ? |
Same issue. It's weird that extensions/v1beta1 ingress is deprecated but still being the default one. |
Fixes #204 Comment describing the API changes for ingress: kubernetes/kubernetes#94761 (comment) Signed-off-by: Taylor Silva <[email protected]>
Fixes #204 Comment describing the API changes for ingress: kubernetes/kubernetes#94761 (comment) Signed-off-by: Taylor Silva <[email protected]>
Existing deployments can't be upgraded as they were deployed using APIs that kubernetes 1.16 (which google upgraded our cluster to) no longer supports. You'd think we would follow: https://docs.gitlab.com/ee/topics/autodevops/troubleshooting.html#error-unable-to-recognize--no-matches-for-kind-deployment-in-version-extensionsv1beta1 but as we've customised our .gitlab-ci.yml quite heavily that method won't work. Some of the customisation/reasons is listed here: https://gitlab.com/openid/conformance-suite/-/wikis/gcp-deployment So manually add a call to do the upgrade using a handy kubectl plugin. This appears to be upgrading our ingress to a newer version. However kubectl itself (and the gcp console) seem reluctant to show the newer version, and kubectl convert fails to upgrade the ingress: $ kubectl convert -f ./chart/templates/ingress.yaml --output-version "networking/v1beta1" kubectl convert is DEPRECATED and will be removed in a future version. In order to convert, kubectl apply the object to the cluster, then kubectl get at the desired version. error: networking.Ingress is not suitable for converting to "networking/v1beta1" in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:30" This seems to be some kubernetes oddity that others have also run into: kubernetes/kubernetes#94761 As the currently used ingress API won't be removed until kubernetes 1.22 I think we can ignore this for now. closes #876
Actually, that does not work for me. I'm executing |
That is the intended behavior. All ingress objects are available via all served apiVersions, regardless of the version they were created with (the API server converts between versions in order to return ingress objects in the requested version).
One way is to use API server audit logs to find read/write requests to the v1beta1 endpoints to determine which manifests and clients need to be updated. |
It does not work. It returns the same list when use
I see many logs with read request using |
The same items are returned, but in a different API version. add |
This is not true on kubernetes 1.20.5. |
I think we're talking past each other. I was agreeing with you that
The API version used to create an object is not intentionally exposed in the API... all ingress objects are available via all served apiVersions, regardless of the version they were created with (the API server converts between versions in order to return ingress objects in the requested version). |
I see, thank you for clarifying. This means that in 1.22 when ingress.extensions is removed, that all existing ingresses in a cluster will continue to work regardless of how they were created, but new ingresses will have to be created with ingress.networking.k8s.io, correct? |
Correct. All existing Ingress objects are accessible via the new API (as they have been in 1.19+), regardless of how they were created. API clients that talk to the API server over extensions/v1beta1 or networking.k8s.io/v1beta1 endpoints to get/create/update Ingress objects will have to change to networking.k8s.io/v1 to continue working against a 1.22+ cluster. That includes kubectl (getting ingresses), ingress manifests, other components making Ingress API requests, and ingress controllers (responsible for watching ingress objects and reacting to them). |
What happened:
Manifest resource :- https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
What you expected to happen:
I would like to know that I used apiVersion: networking.k8s.io/v1 to create an ingress in v1.19 but when I looked into the yaml file via
kubectl get ingress minimal-ingress -oyaml
, apiVersion isextensions/v1beta1
. What kind of behaviour is this? Is it expected?Can you please look into this and assist me to understand this issue?
Environment:
kubectl version
):cat /etc/os-release
):uname -a
): Linux 4.15.0-111-generic x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: