Deprecated API Migration Guide
As the Kubernetes API evolves, APIs are periodically reorganized or upgraded. When APIs evolve, the old API is deprecated and eventually removed. This page contains information you need to know when migrating from deprecated API versions to newer and more stable API versions.
Removed APIs by release
v1.32
The v1.32 release stopped serving the following deprecated API versions:
Flow control resources
The flowcontrol.apiserver.k8s.io/v1beta3 API version of FlowSchema and PriorityLevelConfiguration is no longer served as of v1.32.
- Migrate manifests and API clients to use the flowcontrol.apiserver.k8s.io/v1 API version, available since v1.29.
- All existing persisted objects are accessible via the new API
- Notable changes in flowcontrol.apiserver.k8s.io/v1:
- The PriorityLevelConfiguration spec.limited.nominalConcurrencySharesfield only defaults to 30 when unspecified, and an explicit value of 0 is not changed to 30.
 
- The PriorityLevelConfiguration 
v1.29
The v1.29 release stopped serving the following deprecated API versions:
Flow control resources
The flowcontrol.apiserver.k8s.io/v1beta2 API version of FlowSchema and PriorityLevelConfiguration is no longer served as of v1.29.
- Migrate manifests and API clients to use the flowcontrol.apiserver.k8s.io/v1 API version, available since v1.29, or the flowcontrol.apiserver.k8s.io/v1beta3 API version, available since v1.26.
- All existing persisted objects are accessible via the new API
- Notable changes in flowcontrol.apiserver.k8s.io/v1:
- The PriorityLevelConfiguration spec.limited.assuredConcurrencySharesfield is renamed tospec.limited.nominalConcurrencySharesand only defaults to 30 when unspecified, and an explicit value of 0 is not changed to 30.
 
- The PriorityLevelConfiguration 
- Notable changes in flowcontrol.apiserver.k8s.io/v1beta3:
- The PriorityLevelConfiguration spec.limited.assuredConcurrencySharesfield is renamed tospec.limited.nominalConcurrencyShares
 
- The PriorityLevelConfiguration 
v1.27
The v1.27 release stopped serving the following deprecated API versions:
CSIStorageCapacity
The storage.k8s.io/v1beta1 API version of CSIStorageCapacity is no longer served as of v1.27.
- Migrate manifests and API clients to use the storage.k8s.io/v1 API version, available since v1.24.
- All existing persisted objects are accessible via the new API
- No notable changes
v1.26
The v1.26 release stopped serving the following deprecated API versions:
Flow control resources
The flowcontrol.apiserver.k8s.io/v1beta1 API version of FlowSchema and PriorityLevelConfiguration is no longer served as of v1.26.
- Migrate manifests and API clients to use the flowcontrol.apiserver.k8s.io/v1beta2 API version.
- All existing persisted objects are accessible via the new API
- No notable changes
HorizontalPodAutoscaler
The autoscaling/v2beta2 API version of HorizontalPodAutoscaler is no longer served as of v1.26.
- Migrate manifests and API clients to use the autoscaling/v2 API version, available since v1.23.
- All existing persisted objects are accessible via the new API
- Notable changes:
- targetAverageUtilizationis replaced with- target.averageUtilizationand- target.type: Utilization. See Autoscaling on multiple metrics and custom metrics.
 
v1.25
The v1.25 release stopped serving the following deprecated API versions:
CronJob
The batch/v1beta1 API version of CronJob is no longer served as of v1.25.
- Migrate manifests and API clients to use the batch/v1 API version, available since v1.21.
- All existing persisted objects are accessible via the new API
- No notable changes
EndpointSlice
The discovery.k8s.io/v1beta1 API version of EndpointSlice is no longer served as of v1.25.
- Migrate manifests and API clients to use the discovery.k8s.io/v1 API version, available since v1.21.
- All existing persisted objects are accessible via the new API
- Notable changes in discovery.k8s.io/v1:
- use per Endpoint nodeNamefield instead of deprecatedtopology["kubernetes.io/hostname"]field
- use per Endpoint zonefield instead of deprecatedtopology["topology.kubernetes.io/zone"]field
- topologyis replaced with the- deprecatedTopologyfield which is not writable in v1
 
- use per Endpoint 
Event
The events.k8s.io/v1beta1 API version of Event is no longer served as of v1.25.
- Migrate manifests and API clients to use the events.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- Notable changes in events.k8s.io/v1:
- typeis limited to- Normaland- Warning
- involvedObjectis renamed to- regarding
- action,- reason,- reportingController, and- reportingInstanceare required when creating new events.k8s.io/v1 Events
- use eventTimeinstead of the deprecatedfirstTimestampfield (which is renamed todeprecatedFirstTimestampand not permitted in new events.k8s.io/v1 Events)
- use series.lastObservedTimeinstead of the deprecatedlastTimestampfield (which is renamed todeprecatedLastTimestampand not permitted in new events.k8s.io/v1 Events)
- use series.countinstead of the deprecatedcountfield (which is renamed todeprecatedCountand not permitted in new events.k8s.io/v1 Events)
- use reportingControllerinstead of the deprecatedsource.componentfield (which is renamed todeprecatedSource.componentand not permitted in new events.k8s.io/v1 Events)
- use reportingInstanceinstead of the deprecatedsource.hostfield (which is renamed todeprecatedSource.hostand not permitted in new events.k8s.io/v1 Events)
 
HorizontalPodAutoscaler
The autoscaling/v2beta1 API version of HorizontalPodAutoscaler is no longer served as of v1.25.
- Migrate manifests and API clients to use the autoscaling/v2 API version, available since v1.23.
- All existing persisted objects are accessible via the new API
- Notable changes:
- targetAverageUtilizationis replaced with- target.averageUtilizationand- target.type: Utilization. See Autoscaling on multiple metrics and custom metrics.
 
PodDisruptionBudget
The policy/v1beta1 API version of PodDisruptionBudget is no longer served as of v1.25.
- Migrate manifests and API clients to use the policy/v1 API version, available since v1.21.
- All existing persisted objects are accessible via the new API
- Notable changes in policy/v1:
- an empty spec.selector({}) written to apolicy/v1PodDisruptionBudget selects all pods in the namespace (inpolicy/v1beta1an emptyspec.selectorselected no pods). An unsetspec.selectorselects no pods in either API version.
 
- an empty 
PodSecurityPolicy
PodSecurityPolicy in the policy/v1beta1 API version is no longer served as of v1.25, and the PodSecurityPolicy admission controller will be removed.
Migrate to Pod Security Admission or a 3rd party admission webhook. For a migration guide, see Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller. For more information on the deprecation, see PodSecurityPolicy Deprecation: Past, Present, and Future.
RuntimeClass
RuntimeClass in the node.k8s.io/v1beta1 API version is no longer served as of v1.25.
- Migrate manifests and API clients to use the node.k8s.io/v1 API version, available since v1.20.
- All existing persisted objects are accessible via the new API
- No notable changes
v1.22
The v1.22 release stopped serving the following deprecated API versions:
Webhook resources
The admissionregistration.k8s.io/v1beta1 API version of MutatingWebhookConfiguration and ValidatingWebhookConfiguration is no longer served as of v1.22.
- Migrate manifests and API clients to use the admissionregistration.k8s.io/v1 API version, available since v1.16.
- All existing persisted objects are accessible via the new APIs
- Notable changes:
- webhooks[*].failurePolicydefault changed from- Ignoreto- Failfor v1
- webhooks[*].matchPolicydefault changed from- Exactto- Equivalentfor v1
- webhooks[*].timeoutSecondsdefault changed from- 30sto- 10sfor v1
- webhooks[*].sideEffectsdefault value is removed, and the field made required, and only- Noneand- NoneOnDryRunare permitted for v1
- webhooks[*].admissionReviewVersionsdefault value is removed and the field made required for v1 (supported versions for AdmissionReview are- v1and- v1beta1)
- webhooks[*].namemust be unique in the list for objects created via- admissionregistration.k8s.io/v1
 
CustomResourceDefinition
The apiextensions.k8s.io/v1beta1 API version of CustomResourceDefinition is no longer served as of v1.22.
- Migrate manifests and API clients to use the apiextensions.k8s.io/v1 API version, available since v1.16.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.scopeis no longer defaulted to- Namespacedand must be explicitly specified
- spec.versionis removed in v1; use- spec.versionsinstead
- spec.validationis removed in v1; use- spec.versions[*].schemainstead
- spec.subresourcesis removed in v1; use- spec.versions[*].subresourcesinstead
- spec.additionalPrinterColumnsis removed in v1; use- spec.versions[*].additionalPrinterColumnsinstead
- spec.conversion.webhookClientConfigis moved to- spec.conversion.webhook.clientConfigin v1
- spec.conversion.conversionReviewVersionsis moved to- spec.conversion.webhook.conversionReviewVersionsin v1
- spec.versions[*].schema.openAPIV3Schemais now required when creating v1 CustomResourceDefinition objects, and must be a structural schema
- spec.preserveUnknownFields: trueis disallowed when creating v1 CustomResourceDefinition objects; it must be specified within schema definitions as- x-kubernetes-preserve-unknown-fields: true
- In additionalPrinterColumnsitems, theJSONPathfield was renamed tojsonPathin v1 (fixes #66531)
 
APIService
The apiregistration.k8s.io/v1beta1 API version of APIService is no longer served as of v1.22.
- Migrate manifests and API clients to use the apiregistration.k8s.io/v1 API version, available since v1.10.
- All existing persisted objects are accessible via the new API
- No notable changes
TokenReview
The authentication.k8s.io/v1beta1 API version of TokenReview is no longer served as of v1.22.
- Migrate manifests and API clients to use the authentication.k8s.io/v1 API version, available since v1.6.
- No notable changes
SubjectAccessReview resources
The authorization.k8s.io/v1beta1 API version of LocalSubjectAccessReview, SelfSubjectAccessReview, SubjectAccessReview, and SelfSubjectRulesReview is no longer served as of v1.22.
- Migrate manifests and API clients to use the authorization.k8s.io/v1 API version, available since v1.6.
- Notable changes:
- spec.groupwas renamed to- spec.groupsin v1 (fixes #32709)
 
CertificateSigningRequest
The certificates.k8s.io/v1beta1 API version of CertificateSigningRequest is no longer served as of v1.22.
- Migrate manifests and API clients to use the certificates.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- Notable changes in certificates.k8s.io/v1:- For API clients requesting certificates:
- spec.signerNameis now required (see known Kubernetes signers), and requests for- kubernetes.io/legacy-unknownare not allowed to be created via the- certificates.k8s.io/v1API
- spec.usagesis now required, may not contain duplicate values, and must only contain known usages
 
- For API clients approving or signing certificates:
- status.conditionsmay not contain duplicate types
- status.conditions[*].statusis now required
- status.certificatemust be PEM-encoded, and contain only- CERTIFICATEblocks
 
 
- For API clients requesting certificates:
Lease
The coordination.k8s.io/v1beta1 API version of Lease is no longer served as of v1.22.
- Migrate manifests and API clients to use the coordination.k8s.io/v1 API version, available since v1.14.
- All existing persisted objects are accessible via the new API
- No notable changes
Ingress
The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress is no longer served as of v1.22.
- Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.backendis renamed to- spec.defaultBackend
- The backend serviceNamefield is renamed toservice.name
- Numeric backend servicePortfields are renamed toservice.port.number
- String backend servicePortfields are renamed toservice.port.name
- pathTypeis now required for each specified path. Options are- Prefix,- Exact, and- ImplementationSpecific. To match the undefined- v1beta1behavior, use- ImplementationSpecific.
 
IngressClass
The networking.k8s.io/v1beta1 API version of IngressClass is no longer served as of v1.22.
- Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.19.
- All existing persisted objects are accessible via the new API
- No notable changes
RBAC resources
The rbac.authorization.k8s.io/v1beta1 API version of ClusterRole, ClusterRoleBinding, Role, and RoleBinding is no longer served as of v1.22.
- Migrate manifests and API clients to use the rbac.authorization.k8s.io/v1 API version, available since v1.8.
- All existing persisted objects are accessible via the new APIs
- No notable changes
PriorityClass
The scheduling.k8s.io/v1beta1 API version of PriorityClass is no longer served as of v1.22.
- Migrate manifests and API clients to use the scheduling.k8s.io/v1 API version, available since v1.14.
- All existing persisted objects are accessible via the new API
- No notable changes
Storage resources
The storage.k8s.io/v1beta1 API version of CSIDriver, CSINode, StorageClass, and VolumeAttachment is no longer served as of v1.22.
- Migrate manifests and API clients to use the storage.k8s.io/v1 API version
- CSIDriver is available in storage.k8s.io/v1 since v1.19.
- CSINode is available in storage.k8s.io/v1 since v1.17
- StorageClass is available in storage.k8s.io/v1 since v1.6
- VolumeAttachment is available in storage.k8s.io/v1 v1.13
 
- All existing persisted objects are accessible via the new APIs
- No notable changes
v1.16
The v1.16 release stopped serving the following deprecated API versions:
NetworkPolicy
The extensions/v1beta1 API version of NetworkPolicy is no longer served as of v1.16.
- Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1.8.
- All existing persisted objects are accessible via the new API
DaemonSet
The extensions/v1beta1 and apps/v1beta2 API versions of DaemonSet are no longer served as of v1.16.
- Migrate manifests and API clients to use the apps/v1 API version, available since v1.9.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.templateGenerationis removed
- spec.selectoris now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
- spec.updateStrategy.typenow defaults to- RollingUpdate(the default in- extensions/v1beta1was- OnDelete)
 
Deployment
The extensions/v1beta1, apps/v1beta1, and apps/v1beta2 API versions of Deployment are no longer served as of v1.16.
- Migrate manifests and API clients to use the apps/v1 API version, available since v1.9.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.rollbackTois removed
- spec.selectoris now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
- spec.progressDeadlineSecondsnow defaults to- 600seconds (the default in- extensions/v1beta1was no deadline)
- spec.revisionHistoryLimitnow defaults to- 10(the default in- apps/v1beta1was- 2, the default in- extensions/v1beta1was to retain all)
- maxSurgeand- maxUnavailablenow default to- 25%(the default in- extensions/v1beta1was- 1)
 
StatefulSet
The apps/v1beta1 and apps/v1beta2 API versions of StatefulSet are no longer served as of v1.16.
- Migrate manifests and API clients to use the apps/v1 API version, available since v1.9.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.selectoris now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
- spec.updateStrategy.typenow defaults to- RollingUpdate(the default in- apps/v1beta1was- OnDelete)
 
ReplicaSet
The extensions/v1beta1, apps/v1beta1, and apps/v1beta2 API versions of ReplicaSet are no longer served as of v1.16.
- Migrate manifests and API clients to use the apps/v1 API version, available since v1.9.
- All existing persisted objects are accessible via the new API
- Notable changes:
- spec.selectoris now required and immutable after creation; use the existing template labels as the selector for seamless upgrades
 
PodSecurityPolicy
The extensions/v1beta1 API version of PodSecurityPolicy is no longer served as of v1.16.
- Migrate manifests and API client to use the policy/v1beta1 API version, available since v1.10.
- Note that the policy/v1beta1 API version of PodSecurityPolicy will be removed in v1.25.
What to do
Test with deprecated APIs disabled
You can test your clusters by starting an API server with specific API versions disabled to simulate upcoming removals. Add the following flag to the API server startup arguments:
--runtime-config=<group>/<version>=false
For example:
--runtime-config=admissionregistration.k8s.io/v1beta1=false,apiextensions.k8s.io/v1beta1,...
Locate use of deprecated APIs
Use client warnings, metrics, and audit information available in 1.19+ to locate use of deprecated APIs.
Migrate to non-deprecated APIs
- 
Update custom integrations and controllers to call the non-deprecated APIs 
- 
Change YAML files to reference the non-deprecated APIs You can use the kubectl convertcommand to automatically convert an existing object:kubectl convert -f <file> --output-version <group>/<version>.For example, to convert an older Deployment to apps/v1, you can run:kubectl convert -f ./my-deployment.yaml --output-version apps/v1This conversion may use non-ideal default values. To learn more about a specific resource, check the Kubernetes API reference. Note:The kubectl converttool is not installed by default, although in fact it once was part ofkubectlitself. For more details, you can read the deprecation and removal issue for the built-in subcommand.To learn how to set up kubectl converton your computer, visit the page that is right for your operating system: Linux, macOS, or Windows.