Migrate SelfSubjectAccessReview from authorization.k8s.io/v1beta1
SelfSubjectAccessReview asks whether the current user can perform an action, and kubectl auth can-i uses it. Kubernetes 1.22 removed authorization.k8s.io/v1beta1. It is a request rather than a stored object, so the fix belongs in clients that still send v1beta1.
What replaces it
- Replacement
authorization.k8s.io/v1- Available since
- 1.6
- Deprecated in
- 1.19
- Removed in
- 1.22
Check a manifest against 1.22, or read the official documentation.
Before and after
Before:
apiVersion: authorization.k8s.io/v1beta1
kind: SelfSubjectAccessReview
metadata:
name: example
spec:
resourceAttributes:
namespace: shop
verb: get
resource: pods
# The rest of the object stays the same. After:
apiVersion: authorization.k8s.io/v1
kind: SelfSubjectAccessReview
metadata:
name: example
spec:
resourceAttributes:
namespace: shop
verb: get
resource: pods
# The rest of the object stays the same.