Skip to content

Commit 2c02aeb

Browse files
authored
Merge pull request #28931 from sftim/20210713_revise_kubernetes_1.21_api_removals_article
Revise API removal article
2 parents 0732592 + 7aa360d commit 2c02aeb

File tree

1 file changed

+30
-19
lines changed
  • content/en/blog/_posts/2021-07-14-upcoming-changes-in-kubernetes-1-22

1 file changed

+30
-19
lines changed

content/en/blog/_posts/2021-07-14-upcoming-changes-in-kubernetes-1-22/index.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ API versions.
3838
* The beta `Lease` API (**coordination.k8s.io/v1beta1**)
3939
* All beta `Ingress` APIs (the **extensions/v1beta1** and **networking.k8s.io/v1beta1** API versions)
4040

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.
4144

4245
## What to do
4346

@@ -94,12 +97,13 @@ and explain the steps you'll need to take.
9497

9598
`TokenReview`
9699
: 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.
98101

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.
103107

104108
`SubjectAccessReview`, `SelfSubjectAccessReview` and `LocalSubjectAccessReview`
105109
: Migrate to use the **authorization.k8s.io/v1** versions of those
@@ -150,24 +154,17 @@ removals before you upgrade to Kubernetes v1.22.
150154

151155
To do that, add the following to the kube-apiserver command line arguments:
152156

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).
154161

155162
Once you've switched all the kube-apiservers in your cluster to use that setting,
156163
those beta APIs are removed. You can test that API clients (`kubectl`, deployment
157164
tools, custom controllers etc) still work how you expect, and you can revert if
158165
you need to without having to plan a more disruptive downgrade.
159166

160167

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.
171168

172169
### Advice for software authors
173170

@@ -237,9 +234,23 @@ are documented.
237234

238235
### Looking ahead
239236

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
243254
[PodSecurityPolicy Deprecation: Past, Present, and Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/)
244255
for more information.
245256

0 commit comments

Comments
 (0)