Create a cronjob named xfusion
.
Set its schedule to something like */7 * * * *
. You can set any schedule for now.
Name the container cron-xfusion
.
Utilize the httpd
image with latest tag
(specify as httpd:latest
).
Execute the dummy command echo Welcome to xfusioncorp!
.
Ensure the restart policy is OnFailure
.
Create a manifest file cronjob.yaml
using given details.
Now apply the yaml manifest file.
We can also use kubectl apply -f cronjob.yaml
too.
Let’s get the result.
Describe the cronjob now.
#cronjob #k8s #kubernetes #happylearning