From 027ec6ceeb2e59137b7b61ff5efd255f9b36a879 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 25 May 2022 23:09:11 +0200 Subject: [PATCH] Add sample backup job to the host --- generic/rsync-backup-job.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 generic/rsync-backup-job.yaml diff --git a/generic/rsync-backup-job.yaml b/generic/rsync-backup-job.yaml new file mode 100644 index 0000000..c8606c8 --- /dev/null +++ b/generic/rsync-backup-job.yaml @@ -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