Kubernetes 1.16 deprecation of daemonset, statefulset, deployments and replicasets

8/28/2020

1.16 deprecation notice:

DaemonSet, Deployment, StatefulSet, and ReplicaSet resources will no longer
 be served from extensions/v1beta1, apps/v1beta1, or apps/v1beta2 in v1.16. Migrate to the apps/v1 API, available since v1.9. Existing persisted data 
can be retrieved through the apps/v1 API. For example, to convert a 
Deployment that currently uses apps/v1beta1, enter the following command. 

I have about 10 helm charts that contain the old api versions - datadog, nginx-ingress and more. I don't want to upgrade these different services. are there any known work arounds?

-- sebastian
amazon-eks
kubernetes

1 Answer

8/28/2020

There are some options you should consider:

  • don't update anything and just stick to Kubernetes 1.15 (not recommended as it is 4 main versions behind the latest one)

  • git clone your repo and change apiVersion to apps/v1 in all your resources

  • use kubectl convert in order to change the apiVersion, for example: kubectl convert -f deployment.yaml --output-version apps/v1

It is worth to mention that stuff gets deprecated for a reason and it is strongly not recommended to stick to old ways if they are not supported anymore.

-- WytrzymaƂy Wiktor
Source: StackOverflow