Add sample backup job to the host
This commit is contained in:
parent
e394fdf2d8
commit
027ec6ceeb
1 changed files with 27 additions and 0 deletions
27
generic/rsync-backup-job.yaml
Normal file
27
generic/rsync-backup-job.yaml
Normal 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
|
Loading…
Reference in a new issue