ungleich-k8s/generic/rsync-backup-job.yaml
2022-05-25 23:09:11 +02:00

27 lines
567 B
YAML

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