Keeping an Eye on Secure Containers: Detecting Container Drift with Admission Controllers
At Box, we use Kubernetes (K8s) to manage hundreds of microservices that enable us to stream data …
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: OnFailure
With 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
At Box, we use Kubernetes (K8s) to manage hundreds of microservices that enable us to stream data …
The Security Profiles Operator (SPO) is a pivotal extension for Kubernetes, significantly …
Kubernetes v1.22, released in August 2021, introduces a new alpha feature that enhances how Linux …