I thought I’d strike again with a small hands-on tutorial on using Janos, a tool we created to simplify the migration to EKS 1.16 as required by Amazon. This will be the final step towards ending EKS 1.15 support by May 3, 2021. Nothing too fancy. Just straight to the point :)
Kubernetes sometimes deprecates apiVersions. Most notably, many deprecations occurred in the 1.16 release.
Therefore, you will need to update your Kubernetes manifests to the correct API references before that deadline! At SumUp, we automated this process as we have a large number of clusters.
We started by reading this article, which is a great start but is missing some steps, such as making
spec.selector a mandatory field for
kind = Deployment |Daemonset |Statefulset |ReplicaSet .
Janos performs the following changes:
* 1.16: for Kind: Deployment |Daemonset |Statefulset |ReplicaSet Replace for extensions/v1beta1 | apps/v1beta1 | apps/v1beta2 with apps/v1* 1.16: for Kind: Ingress. Replaces: extensions/v1beta1 with networking.k8s.io/v1beta1* 1.16: for Kind: PodSecurityPolicy. Replaces: extensions/v1beta1 |apps/v1beta2 with policy/v1beta1* 1.16: Generates the now-required spec.selector for Kind Deployment |Daemonset |Statefulset |ReplicaSet (using matchLabels app name), if not already present* 1.17: for Kinds:Role |ClusterRole |RoleBinding |ClusterRoleBinding: Replaces rbac.authorization.k8s.io/v1alpha1 | rbac.authorization.k8s.io/v1beta1 with rbac.authorization.k8s.io/v1* 1.19: for Kind: HorizontalPodAutoscaler. Replaces: autoscaling/v2beta1 with autoscaling/v2beta2
The code can be found here: https://github.com/sumup-oss/janos
So just create a branch, run the tool and generate a PR with all this changes.
> git checkout -b eks-migration
Build the image before running the script, because it will be executed inside the container.
# Build image
make build# Copy entrypoint script to /usr/local/bin
janos -d /path/to/yamls
All the rules are in the file
EKS update done :)