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
app/v1 show as extensions/v1beta1 when kubectl get xxx -oyaml
#58131
Comments
If you want to ensure you get a deployment in the apps api group, fully qualify the resource you are requesting by running If you want a specific version, like v1, in the apps api group, include that as well: |
Hi @liggitt I appreciate the explanation, at the same time we see the behaviour of We are willing to help to address this if it's any relevant for anyone... |
correct. that is working properly.
it is intentional that internal storage details are not visible via the external versioned APIs. if we wanted to expose storage details, that information would be communicated separately, but I don't actually think that is necessary. see https://docs.google.com/document/d/1eoS1K40HLMl4zUyw5pnC05dEF3mzFLp5TPEEt4PFvsM/edit# for some discussion of the options here. the simplest approach is to get/put every object after upgrades. objects that don't need migration will no-op (they won't even increment resourceVersion in etcd). objects that do need migration will persist in the new preferred storage version. |
This is an interesting topic, which doesn't have much coverage in Kubernetes community. What stored version is used for? Does stored api version influence behaviour of controllers, in other words can they potentially interpret same values and fields differently depending on the stored object's api version? Is it possible find out stored API version of the object without querying etcd directly? When it is safe to disable api groups like
how exactly it can be done? is it enough to do something like |
It is the serialized version in etcd. Whenever you fetch an object, the api server reads it from etcd, converts it into an internal version, then converts it to the version you requested.
Controllers always get the version they requested from the API. They are not exposed to the stored version.
No
Disabling the groups from being served doesn't disable the ability of the apiserver to decode objects in those versions from etcd.
no conversion is necessary... a simple get/put of raw bytes is sufficient something like |
@liggitt , thanks for clarifying, it seems that internal version can affect users only when apiserver can't decode stored objects, which shouldn't happen unless conversion controller is implemented. It explains why this topic is not covered widely - there is no much user-visible effect, which just shows great work Kubernetes developers are doing. For curious minds, I found an extensive doc describing internal mechanics here https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md |
…ently handle that When requesting apps/v1 group resource, it dynamically converts from internal storage (old or new version) to the requested version. See kubernetes/kubernetes#58131 for more discussion.
Current link is here https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md |
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
kubectl version
Deployment file with
apps/v1
as apiVersion.Create the deployment
After deployment finished, check the deployment yaml output, it was still using
/sig api-machinery
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: