ungleich-k8s/generic/rsync-backup-job.yaml

28 lines
567 B
YAML
Raw Normal View History

2022-05-25 21:09:11 +00:00
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