Skip to content

Commit 6a6fc84

Browse files
committed
Add page listing removed beta versions and notable changes
1 parent 0a0dc4d commit 6a6fc84

File tree

1 file changed

+265
-0
lines changed

1 file changed

+265
-0
lines changed
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
---
2+
reviewers:
3+
- liggitt
4+
- lavalamp
5+
- thockin
6+
- smarterclayton
7+
title: "Deprecated API Migration Guide"
8+
weight: 45
9+
content_type: api_reference
10+
---
11+
12+
<!-- overview -->
13+
14+
As the Kubernetes API evolves, APIs are periodically reorganized or upgraded.
15+
When APIs evolve, the old API is deprecated and eventually removed.
16+
This page contains information you need to know when migrating from
17+
deprecated API versions to newer and more stable API versions.
18+
19+
<!-- body -->
20+
21+
## Removed APIs by release
22+
23+
24+
### v1.25
25+
26+
The **v1.25** release will stop serving the following deprecated API versions:
27+
28+
#### Event
29+
30+
The **events.k8s.io/v1beta1** API version of Event will no longer be served in v1.25.
31+
32+
* Migrate manifests and API clients to use the **events.k8s.io/v1** API version, available since v1.19.
33+
* All existing persisted objects are accessible via the new API
34+
* Notable changes
35+
36+
#### RuntimeClass
37+
38+
RuntimeClass in the **node.k8s.io/v1beta1** API version will no longer be served in v1.25.
39+
40+
* Migrate manifests and API clients to use the **node.k8s.io/v1** API version, available since v1.20.
41+
* All existing persisted objects are accessible via the new API
42+
* No notable changes
43+
44+
### v1.22
45+
46+
The **v1.22** release will stop serving the following deprecated API versions:
47+
48+
#### MutatingWebhookConfiguration and ValidatingWebhookConfiguration
49+
50+
The **admissionregistration.k8s.io/v1beta1** API version of MutatingWebhookConfiguration and ValidatingWebhookConfiguration will no longer be served in v1.22.
51+
52+
* Migrate manifests and API clients to use the **admissionregistration.k8s.io/v1** API version, available since v1.16.
53+
* All existing persisted objects are accessible via the new API
54+
* Notable changes:
55+
* `webhooks[*].failurePolicy` default changed from `Ignore` to `Fail` for v1
56+
* `webhooks[*].matchPolicy` default changed from `Exact` to `Equivalent` for v1
57+
* `webhooks[*].timeoutSeconds` default changed from `30s` to `10s` for v1
58+
* `webhooks[*].sideEffects` default value is removed, and the field made required, and only `None` and `NoneOnDryRun` are permitted for v1
59+
* `webhooks[*].admissionReviewVersions` default value is removed and the field made required for v1 (supported versions for AdmissionReview are `v1` and `v1beta1`)
60+
* `webhooks[*].name` must be unique in the list for objects created via `admissionregistration.k8s.io/v1`
61+
62+
#### CustomResourceDefinitions
63+
64+
The **apiextensions.k8s.io/v1beta1** API version of CustomResourceDefinition will no longer be served in v1.22.
65+
66+
* Migrate manifests and API clients to use the **apiextensions.k8s.io/v1beta1** API version, available since v1.16.
67+
* All existing persisted objects are accessible via the new API
68+
* Notable changes:
69+
* `spec.scope` is no longer defaulted to `Namespaced` and must be explicitly specified
70+
* `spec.version` is removed in v1; use `spec.versions` instead
71+
* `spec.validation` is removed in v1; use `spec.versions[*].schema` instead
72+
* `spec.subresources` is removed in v1; use `spec.versions[*].subresources` instead
73+
* `spec.additionalPrinterColumns` is removed in v1; use `spec.versions[*].additionalPrinterColumns` instead
74+
* `spec.conversion.webhookClientConfig` is moved to `spec.conversion.webhook.clientConfig` in v1
75+
* `spec.conversion.conversionReviewVersions` is moved to `spec.conversion.webhook.conversionReviewVersions` in v1
76+
* `spec.versions[*].schema.openAPIV3Schema` is now required when creating v1 CustomResourceDefinitions, and must be a [structural schema](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema)
77+
* `spec.preserveUnknownFields: true` is disallowed when creating v1 CustomResourceDefinitions; it must be specified within schema definitions as `x-kubernetes-preserve-unknown-fields: true`
78+
* In `additionalPrinterColumns` items, the `JSONPath` field was renamed to `jsonPath` in v1 (fixes [#66531](https://github.com/kubernetes/kubernetes/issues/66531))
79+
80+
#### APIService
81+
82+
The **apiregistration.k8s.io/v1beta1** API version of APIService will no longer be served in v1.22.
83+
84+
* Migrate manifests and API clients to use the **apiregistration.k8s.io/v1** API version, available since v1.10.
85+
* All existing persisted objects are accessible via the new API
86+
* No notable changes
87+
88+
#### TokenReview
89+
90+
The **authentication.k8s.io/v1beta1** API version of TokenReview will no longer be served in v1.22.
91+
92+
* Migrate manifests and API clients to use the **authentication.k8s.io/v1** API version, available since v1.6.
93+
* No notable changes
94+
95+
#### SubjectAccessReview
96+
97+
The **authorization.k8s.io/v1beta1** API version of LocalSubjectAccessReview, SelfSubjectAccessReview, and SubjectAccessReview will no longer be served in v1.22.
98+
99+
* Migrate manifests and API clients to use the **authorization.k8s.io/v1** API version, available since v1.6.
100+
* Notable changes:
101+
* `spec.group` was renamed to `spec.groups` in v1 (fixes [#32709](https://github.com/kubernetes/kubernetes/issues/32709))
102+
103+
#### CertificateSigningRequest
104+
105+
The **certificates.k8s.io/v1beta1** API version of CertificateSigningRequest will no longer be served in v1.22.
106+
107+
* Migrate manifests and API clients to use the **certificates.k8s.io/v1** API version, available since v1.19.
108+
* All existing persisted objects are accessible via the new API
109+
* Notable changes in `certificates.k8s.io/v1`:
110+
* For API clients requesting certificates:
111+
* `spec.signerName` is now required (see [known Kubernetes signers](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers)), and requests for `kubernetes.io/legacy-unknown` are not allowed to be created via the `certificates.k8s.io/v1` API
112+
* `spec.usages` is now required, may not contain duplicate values, and must only contain known usages
113+
* For API clients approving or signing certificates:
114+
* `status.conditions` may not contain duplicate types
115+
* `status.conditions[*].status` is now required
116+
* `status.certificate` must be PEM-encoded, and contain only `CERTIFICATE` blocks
117+
118+
#### Lease
119+
120+
The **coordination.k8s.io/v1beta1** API version of Lease will no longer be served in v1.22.
121+
122+
* Migrate manifests and API clients to use the **coordination.k8s.io/v1** API version, available since v1.14.
123+
* All existing persisted objects are accessible via the new API
124+
* No notable changes
125+
126+
#### Ingress
127+
128+
The **extensions/v1beta1** and **networking.k8s.io/v1beta1** API versions of Ingress will no longer be served in v1.22.
129+
130+
* Migrate manifests and API clients to use the **networking.k8s.io/v1** API version, available since v1.19.
131+
* All existing persisted objects are accessible via the new API
132+
* Notable changes:
133+
* `spec.backend` is renamed to `spec.defaultBackend`
134+
* The backend `serviceName` field is renamed to `service.name`
135+
* Numeric backend `servicePort` fields are renamed to `service.port.number`
136+
* String backend `servicePort` fields are renamed to `service.port.name`
137+
* `pathType` is now required for each specified path. Options are `Prefix`, `Exact`, and `ImplementationSpecific`. To match the undefined `v1beta1` behavior, use `ImplementationSpecific`.
138+
139+
#### IngressClass
140+
141+
The **networking.k8s.io/v1beta1** API version of IngressClass will no longer be served in v1.22.
142+
143+
* Migrate manifests and API clients to use the **networking.k8s.io/v1** API version, available since v1.19.
144+
* All existing persisted objects are accessible via the new API
145+
* No notable changes
146+
147+
#### RBAC
148+
149+
The **rbac.authorization.k8s.io/v1beta1** API version of ClusterRole, ClusterRoleBinding, Role, and RoleBinding will no longer be served in v1.22.
150+
151+
* Migrate manifests and API clients to use the **networking.k8s.io/v1** API version, available since v1.8.
152+
* All existing persisted objects are accessible via the new API
153+
* No notable changes
154+
155+
#### PriorityClass
156+
157+
The **scheduling.k8s.io/v1beta1** API version of PriorityClass will no longer be served in v1.22.
158+
159+
* Migrate manifests and API clients to use the **scheduling.k8s.io/v1** API version, available since v1.14.
160+
* All existing persisted objects are accessible via the new API
161+
* No notable changes
162+
163+
#### Storage
164+
165+
The **storage.k8s.io/v1beta1** API version of CSIDriver, CSINode, StorageClass, and VolumeAttachment will no longer be served in v1.22.
166+
167+
* Migrate manifests and API clients to use the **storage.k8s.io/v1** API version
168+
* CSIDriver is available in **storage.k8s.io/v1** since v1.19.
169+
* CSINode is available in **storage.k8s.io/v1** since v1.17
170+
* StorageClass is available in **storage.k8s.io/v1** since v1.6
171+
* VolumeAttachment is available in **storage.k8s.io/v1** v1.13
172+
* All existing persisted objects are accessible via the new API
173+
* No notable changes
174+
175+
### v1.16
176+
177+
The **v1.16** release stopped serving the following deprecated API versions:
178+
179+
#### NetworkPolicy
180+
181+
The **extensions/v1beta1** API version of NetworkPolicy is no longer served as of v1.16.
182+
183+
* Migrate manifests and API clients to use the **networking.k8s.io/v1** API version, available since v1.8.
184+
* All existing persisted objects are accessible via the new API
185+
186+
#### DaemonSet
187+
188+
The **extensions/v1beta1** and **apps/v1beta2** API versions of DaemonSet are no longer served as of v1.16.
189+
190+
* Migrate manifests and API clients to use the **apps/v1** API version, available since v1.9.
191+
* All existing persisted objects are accessible via the new API
192+
* Notable changes:
193+
* `spec.templateGeneration` is removed
194+
* `spec.selector` is now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
195+
* `spec.updateStrategy.type` now defaults to `RollingUpdate` (the default in `extensions/v1beta1` was `OnDelete`)
196+
197+
#### Deployment
198+
199+
The **extensions/v1beta1**, **apps/v1beta1**, and **apps/v1beta2** API versions of Deployment are no longer served as of v1.16.
200+
201+
* Migrate manifests and API clients to use the **apps/v1** API version, available since v1.9.
202+
* All existing persisted objects are accessible via the new API
203+
* Notable changes:
204+
* `spec.rollbackTo` is removed
205+
* `spec.selector` is now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
206+
* `spec.progressDeadlineSeconds` now defaults to `600` seconds (the default in `extensions/v1beta1` was no deadline)
207+
* `spec.revisionHistoryLimit` now defaults to `10` (the default in `apps/v1beta1` was `2`, the default in `extensions/v1beta1` was to retain all)
208+
* `maxSurge` and `maxUnavailable` now default to `25%` (the default in `extensions/v1beta1` was `1`)
209+
210+
#### StatefulSet
211+
212+
The **apps/v1beta1** and **apps/v1beta2** API versions of StatefulSet are no longer served as of v1.16.
213+
214+
* Migrate manifests and API clients to use the **apps/v1** API version, available since v1.9.
215+
* All existing persisted objects are accessible via the new API
216+
* Notable changes:
217+
* `spec.selector` is now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
218+
* `spec.updateStrategy.type` now defaults to `RollingUpdate` (the default in `apps/v1beta1` was `OnDelete`)
219+
220+
#### ReplicaSet
221+
222+
The **extensions/v1beta1**, **apps/v1beta1**, and **apps/v1beta2** API versions of ReplicaSet are no longer served as of v1.16.
223+
224+
* Migrate manifests and API clients to use the **apps/v1** API version, available since v1.9.
225+
* All existing persisted objects are accessible via the new API
226+
* Notable changes:
227+
* `spec.selector` is now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
228+
229+
## What To Do
230+
231+
Kubernetes 1.22 will be released later in 2021, so be sure to audit
232+
your configuration and integrations now!
233+
234+
### Test with deprecated APIs disabled
235+
236+
You can test your clusters by starting an API server with specific API versions disabled
237+
to simulate upcoming removals. Add the following flag to the API server startup arguments:
238+
239+
`--runtime-config=$group/$version=false`
240+
241+
For example:
242+
243+
`--runtime-config=admissionregistration.k8s.io/v1beta1=false,apiextensions.k8s.io/v1beta1,...`
244+
245+
### Locate use of deprecated APIs
246+
247+
Use [client warnings, metrics, and audit information available in 1.19+](https://kubernetes.io/blog/2020/09/03/warnings/#deprecation-warnings)
248+
to locate use of deprecated APIs.
249+
250+
### Migrate to non-deprecated APIs
251+
252+
* Update custom integrations and controllers to call the non-deprecated APIs
253+
* Change YAML files to reference the non-deprecated APIs
254+
255+
You can use the `kubectl-convert` command (`kubectl convert` prior to v1.20)
256+
to automatically convert an existing object:
257+
258+
`kubectl-convert -f <file> --output-version <group>/<version>`.
259+
260+
For example, to convert an older Deployment to `apps/v1`, you can run:
261+
262+
`kubectl-convert -f ./my-deployment.yaml --output-version apps/v1`
263+
264+
Note that this may use non-ideal default values. To learn more about a specific
265+
resource, check the Kubernetes [api reference](https://kubernetes.io/docs/reference/#api-reference).

0 commit comments

Comments
 (0)