Skip to content

Instantly share code, notes, and snippets.

@sampowers
Created June 13, 2017 06:08
Show Gist options
  • Save sampowers/88a69e21dff68a8000f67dcb878aab7c to your computer and use it in GitHub Desktop.
Save sampowers/88a69e21dff68a8000f67dcb878aab7c to your computer and use it in GitHub Desktop.
spawns hwclock every minute on a kubernetes cluster, useful for syncing minikube
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: "clock-puncher"
spec:
schedule: '*/1 * * * *'
suspend: false
jobTemplate:
spec:
template:
spec:
containers:
- name: "clock-puncher"
image: "busybox"
command: ["hwclock", "-s"]
securityContext:
privileged: true
capabilities:
add:
- SYS_TIME
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment