Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Kubernetes #133

Closed
1 of 3 tasks
ghost opened this issue Jul 19, 2022 · 3 comments
Closed
1 of 3 tasks

[Question] Kubernetes #133

ghost opened this issue Jul 19, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Jul 19, 2022

  • I'm submitting a ...
    • bug report
    • feature request
    • support request

Hello,

I would like to know if someone tried with Kubernetes (init with kubeadm).
Because, I'm truly thinking about stopping with docker swarm since I'm not sure about the future with this.

And, this software is really what I'm looking for backing up my data.

Thanks you !

@m90
Copy link
Member

m90 commented Jul 19, 2022

I have to admit I don't know anything about Kubernetes, so I might not be a good reference here. My gut feeling tells me this image probably won't work well with Kubernetes as soon as you rely on functionality that requires interaction with the Docker Daemon (starting and stopping containers, executing commands) as Kubernetes will have a different API than Docker. If you just create and upload archives it should work just as well though. All of this might be wrong and is just a guess.

I have no idea how hard it would be to make it work, but if anyone has feedback on this I am happy to learn about it.

@m90 m90 added the help wanted Extra attention is needed label Jul 19, 2022
@ghost
Copy link
Author

ghost commented Jul 20, 2022

Hello,
Thank you for your answer.

Okay, I see ! That's true docker is quite easy to use and a backup feature like that could be very useful in k8s.
If someone tried already ?

@m90 m90 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
@bdsoha
Copy link

bdsoha commented Nov 19, 2023

I run this image on Kubernetes using a CronJob and it works great:

apiVersion: batch/v1
kind: CronJob
metadata:
  name: backup
spec:
  schedule: "@weekly"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: backup
              image: offen/docker-volume-backup:v2.33.2
              command:
                - backup
              env:
                - name: TZ
                  value: America/New_York
                - name: BACKUP_RETENTION_DAYS
                  value: "21"
                - name: AWS_S3_PATH
                  value: my-path
                - name: AWS_S3_BUCKET_NAME
                  value: backups
                - name: AWS_ACCESS_KEY_ID
                  valueFrom:
                    secretKeyRef:
                      name: backup
                      key: access-key
                - name: AWS_SECRET_ACCESS_KEY
                  valueFrom:
                    secretKeyRef:
                      name: backup
                      key: secret-key
              volumeMounts:
                - name: configurations
                  mountPath: /backup
                  readOnly: true
          volumes:
            - name: configurations
              persistentVolumeClaim:
                claimName: project-to-backup
          restartPolicy: OnFailure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants