@@ -38,6 +38,9 @@ API versions.
38
38
* The beta ` Lease ` API (** coordination.k8s.io/v1beta1** )
39
39
* All beta ` Ingress ` APIs (the ** extensions/v1beta1** and ** networking.k8s.io/v1beta1** API versions)
40
40
41
+ The Kubernetes documentation covers these
42
+ [ API removals for v1.22] ( /docs/reference/using-api/deprecation-guide/#v1-22 ) and explains
43
+ how each of those APIs change between beta and stable.
41
44
42
45
## What to do
43
46
@@ -94,12 +97,13 @@ and explain the steps you'll need to take.
94
97
95
98
` TokenReview `
96
99
: Migrate to use the ** authentication.k8s.io/v1** [ TokenReview] ( /docs/reference/kubernetes-api/authentication-resources/token-review-v1/ )
97
- API, available since v1.10.
100
+ API, available since v1.10.
98
101
99
- In Kubernetes version v1.21 and earlier, the Kubernetes API server
100
- [ defaults] ( /docs/reference/access-authn-authz/authentication/#webhook-token-authentication )
101
- to sending _ beta_ TokenReviews to webhooks. See [ Rehearse for the upgrade] ( #rehearse-for-the-upgrade )
102
- for some specific tips about switching to the stable API.
102
+ As well as serving this API via HTTP, the Kubernetes API server uses the same format to
103
+ [ send] ( /docs/reference/access-authn-authz/authentication/#webhook-token-authentication )
104
+ TokenReviews to webhooks. The v1.22 release continues to use the v1beta1 API for TokenReviews
105
+ sent to webhooks. See [ Looking ahead] ( #looking-ahead ) for some specific tips about
106
+ switching to the stable API.
103
107
104
108
` SubjectAccessReview ` , ` SelfSubjectAccessReview ` and ` LocalSubjectAccessReview `
105
109
: Migrate to use the ** authorization.k8s.io/v1** versions of those
@@ -150,24 +154,17 @@ removals before you upgrade to Kubernetes v1.22.
150
154
151
155
To do that, add the following to the kube-apiserver command line arguments:
152
156
153
- ` --runtime-config=admissionregistration.k8s.io/v1beta1=false,apiextensions.k8s.io/v1beta1=false,apiregistration.k8s.io/v1beta1=false,authentication.k8s.io/v1beta1=false,authorization.k9s.io/v1=false,certificates.k8s.io/v1beta=false,coordination.k8s.io/v1beta1=false,extensions/v1beta1/ingresses=false,networking.k8s.io/v1beta1/ingresses=false,networking.k8s.io/v1beta1/ingressclasses=false `
157
+ ` --runtime-config=admissionregistration.k8s.io/v1beta1=false,apiextensions.k8s.io/v1beta1=false,apiregistration.k8s.io/v1beta1=false,authentication.k8s.io/v1beta1=false,authorization.k9s.io/v1=false,certificates.k8s.io/v1beta=false,coordination.k8s.io/v1beta1=false,extensions/v1beta1/ingresses=false,networking.k8s.io/v1beta1=false `
158
+
159
+ (as a side effect, this also turns off v1beta1 of EndpointSlice - watch out for
160
+ that when you're testing).
154
161
155
162
Once you've switched all the kube-apiservers in your cluster to use that setting,
156
163
those beta APIs are removed. You can test that API clients (` kubectl ` , deployment
157
164
tools, custom controllers etc) still work how you expect, and you can revert if
158
165
you need to without having to plan a more disruptive downgrade.
159
166
160
167
161
- There's another setting that's relevant if you use webhook authentication checks.
162
- Kubernetes v1.22 is the first version of Kubernetes that sends TokenReview objects
163
- to webhooks using the ` authentication.k8s.io/v1 ` API by default. However, you can
164
- switch over earlier to try it out.
165
- Add ` --authentication-token-webhook-version=v1 ` to the command line options for
166
- the kube-apiserver, and check that webhooks for authentication still work how you
167
- expected.
168
-
169
- Once you're happy it works, you can leave the ` --authentication-token-webhook-version=v1 `
170
- option set through and after the upgrade to v1.22.
171
168
172
169
### Advice for software authors
173
170
@@ -237,9 +234,23 @@ are documented.
237
234
238
235
### Looking ahead
239
236
240
- The upcoming ** v1.25** release will stop serving beta versions of several Kubernetes APIs
241
- that have been stable for some time. The same release ** removes** PodSecurityPolicy,
242
- which is deprecated and won't graduate to stable. See
237
+ There's a setting that's relevant if you use webhook authentication checks.
238
+ A future Kubernetes release will switch to sending TokenReview objects
239
+ to webhooks using the ` authentication.k8s.io/v1 ` API by default. At the moment,
240
+ the default is to send ` authentication.k8s.io/v1beta1 ` TokenReviews to webhooks,
241
+ and that's still the default for Kubernetes v1.22.
242
+ However, you can switch over to the stable API right now if you want:
243
+ add ` --authentication-token-webhook-version=v1 ` to the command line options for
244
+ the kube-apiserver, and check that webhooks for authentication still work how you
245
+ expected.
246
+
247
+ Once you're happy it works OK, you can leave the ` --authentication-token-webhook-version=v1 `
248
+ option set across your control plane.
249
+
250
+ The ** v1.25** release that's planned for next year will stop serving beta versions of
251
+ several Kubernetes APIs that are stable right now and have been for some time.
252
+ The same v1.25 release will ** remove** PodSecurityPolicy, which is deprecated and won't
253
+ graduate to stable. See
243
254
[ PodSecurityPolicy Deprecation: Past, Present, and Future] ( /blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/ )
244
255
for more information.
245
256
0 commit comments