Last active
February 21, 2022 07:35
-
-
Save icheko/5b76cee5dc0e1cfdda246baf82b68280 to your computer and use it in GitHub Desktop.
Medium - Backup files on Kubernetes with kube-tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
containers: | |
- name: jenkins-backup | |
image: 'maorfr/kube-tasks:0.2.0' | |
env: | |
... | |
command: ["/bin/sh","-c"] | |
args: | |
- kube-tasks simple-backup -n $MY_POD_NAMESPACE --selector app.kubernetes.io/name=cloudbees-core --container jenkins --path /var/jenkins_home/ --dst k8s://$MY_POD_NAMESPACE/$MY_POD_NAME/jenkins-backup/backup; | |
echo; | |
echo Backups; | |
echo ----------------------------------; | |
ls -Altc /backup; | |
echo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment