In Kubernetes we can request resources using different API versions:
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:
- ""
resources:
- endpoints
- secrets
verbs:
- create
- get
- watch
- list
- update
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:
- ""
resources:
- endpoints
- secrets
verbs:
- create
- get
- watch
- list
- update
- Would the API version used to create a resource have an impact on the resource stored in ETCD?
- 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?
- Would upgrading to Kubernetes v1.22, which removes
rbac.authorization.k8s.io/v1beta1
, break already created/stored resources? - How are resource transformations between different API versions handled?