28 lines
567 B
YAML
28 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
|