<p>In Kubernetes we can request resources using different API versions:</p>
<pre><code>kubectl get roles.v1.rbac.authorization.k8s.io foo -n bar -oyaml

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: foo
  namespace: bar
rules:
- apiGroups:
  - &quot;&quot;
  resources:
  - endpoints
  - secrets
  verbs:
  - create
  - get
  - watch
  - list
  - update
</code></pre>
<pre><code>kubectl get roles.v1beta1.rbac.authorization.k8s.io foo -n bar -oyaml

Warning: rbac.authorization.k8s.io/v1beta1 Role is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 Role
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: foo
  namespace: bar
rules:
- apiGroups:
  - &quot;&quot;
  resources:
  - endpoints
  - secrets
  verbs:
  - create
  - get
  - watch
  - list
  - update
</code></pre>
<ul>
<li>Would the API version used to create a resource have an impact on the resource stored in ETCD?</li>
<li>If a resource was stored when the newer API version (v1) did not exist yet, would this be a problem when the older API version (v1beta1) is removed?</li>
<li>Would upgrading to Kubernetes v1.22, which removes <code>rbac.authorization.k8s.io/v1beta1</code>, break already created/stored resources?</li>
<li>How are resource transformations between different API versions handled?</li>
</ul>

<blockquote>
<p>If a resource was stored when the newer API version (v1) did not exist
yet, would this be a problem when the older API version (v1beta1) is
removed?</p>
</blockquote>
<p>Kubernetes supports a huge elastic deprecation system, which allows you to create, migrate and maintain API versions in time, however(jumping to your next question, you should sometimes manually upgrade  API versions to up-to-date ones)</p>
<p>You can check <a href="https://kubernetes.io/docs/reference/using-api/deprecation-policy/" rel="nofollow noreferrer">Kubernetes Deprecation Policy guide</a>, that is very important part of keeping cluster in work condition.</p>
<p>Main rules:</p>
<ul>
<li>Rule #1: API elements may only be removed by incrementing the version of the API group.</li>
<li>Rule #2: API objects must be able to round-trip between API versions in a given release without information loss, with the exception of whole REST resources that do not exist in some versions.</li>
<li>Rule #3: An API version in a given track may not be deprecated until a new API version at least as stable is released.</li>
<li>Rule #4a: Other than the most recent API versions in each track, older API versions must be supported after their announced deprecation for a certain duration.</li>
<li>Rule #4b: The &quot;preferred&quot; API version and the &quot;storage version&quot; for a given group may not advance until after a release has been made that supports both the new version and the previous version</li>
</ul>
<p>You can check also table that describes which API versions are supported in a series of subsequent releases.</p>
<hr />
<blockquote>
<p>Would upgrading to Kubernetes v1.22, which removes
rbac.authorization.k8s.io/v1beta1, break already created/stored
resources?</p>
</blockquote>
<p>I think yes and you have to do some actions according to <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#rbac-resources-v122" rel="nofollow noreferrer">1.22 RBAC deprecation resources</a></p>
<p><a href="https://i.stack.imgur.com/cJTAq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cJTAq.png" alt="enter image description here" /></a></p>
<hr />
<blockquote>
<p>How are resource transformations between different API versions
handled?</p>
</blockquote>
<p>Check <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#what-to-do" rel="nofollow noreferrer">What to do</a></p>
<ul>
<li><p><a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#test-with-deprecated-apis-disabled" rel="nofollow noreferrer">Test with deprecated APIs disabled</a></p>
</li>
<li><p><a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#locate-use-of-deprecated-apis" rel="nofollow noreferrer">Locate use of deprecated APIs</a></p>
</li>
<li><p><a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis" rel="nofollow noreferrer">Migrate to non-deprecated APIs</a></p>
</li>
</ul>
