Storage Quality in Kubernetes: How to Optimize Your Resources
Kubernetes v1.22, released in August 2021, introduces a new alpha feature that enhances how Linux …
In Kubernetes v1.21, the CronJob resource has reached General Availability (GA). This not only means that CronJobs are now stable and ready for production use, but also that we have significantly improved performance since Kubernetes v1.19 by implementing a new controller.
Already in Kubernetes v1.20, we introduced a revised v2 controller for CronJobs, initially available as an Alpha feature. In v1.21, we now use this newer controller by default, and the CronJob resource itself is now GA (GroupVersion: batch/v1).
For developers and DevOps teams, the introduction of GA CronJobs means they can rely on a more stable and powerful solution. The new controller architecture allows for better handling of CronJobs and improves the reliability of scheduled tasks in Kubernetes. The decision to promote the API beyond the Beta phase was made by the Kubernetes community to ensure that APIs do not remain in a “permanent Beta” state.
A concrete example of using CronJobs could be the regular backup of data in a database. Suppose you want to perform a backup of your database every day at midnight. With the new CronJob controller, you can achieve this simply and effectively:
apiVersion: batch/v1
kind: CronJob
metadata:
name: db-backup
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: backup
image: my-backup-image
args:
- /bin/sh
- -c
- "pg_dump mydatabase > /backups/backup-$(date +\%F).sql"
restartPolicy: OnFailureWith this configuration, a backup of your database is created every day at midnight. And thanks to the new controller implementation, you have to worry less about stability and performance, as these have now been significantly improved.
Switching to the new CronJob controller not only brings more reliability but also a significant increase in efficiency. At ayedo, we support you in making the most of Kubernetes and managing your container workloads efficiently.
Source: Kubernetes Blog
Kubernetes v1.22, released in August 2021, introduces a new alpha feature that enhances how Linux …
Introduction In Kubernetes, a Node represents a single machine in your cluster. SIG Node is …
In an industrial concept, millions of data points are generated daily. When these data flow into …