Add sample backup job to the host

This commit is contained in:
Nico Schottelius 2022-05-25 23:09:11 +02:00
parent e394fdf2d8
commit 027ec6ceeb

View file

@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: Job
metadata:
name:
backup-test
spec:
template:
spec:
containers:
- name: backup
image: instrumentisto/rsync-ssh:alpine3.16
args:
- rsync
- -a
- /etc
- /mnt/etc-dir
volumeMounts:
- mountPath: /mnt
name: backup
restartPolicy: Never
nodeSelector:
kubernetes.io/hostname: "server101"
volumes:
- name: backup
hostPath:
path: /mnt
type: Directory