mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 13:39:41 +01:00
docs: update Kubernetes deployment
This commit is contained in:
16
README.md
16
README.md
@@ -107,8 +107,12 @@ spec:
|
|||||||
# for a list of available releases.
|
# for a list of available releases.
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- backup
|
- backup
|
||||||
|
- --storage
|
||||||
|
- s3
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "128Mi"
|
memory: "128Mi"
|
||||||
@@ -125,6 +129,18 @@ spec:
|
|||||||
# Please use secret!
|
# Please use secret!
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
value: ""
|
value: ""
|
||||||
|
- name: AWS_S3_ENDPOINT
|
||||||
|
value: "https://s3.amazonaws.com"
|
||||||
|
- name: AWS_S3_BUCKET_NAME
|
||||||
|
value: "xxx"
|
||||||
|
- name: AWS_REGION
|
||||||
|
value: "us-west-2"
|
||||||
|
- name: AWS_ACCESS_KEY
|
||||||
|
value: "xxxx"
|
||||||
|
- name: AWS_SECRET_KEY
|
||||||
|
value: "xxxx"
|
||||||
|
- name: AWS_DISABLE_SSL
|
||||||
|
value: "false"
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
```
|
```
|
||||||
## Available image registries
|
## Available image registries
|
||||||
|
|||||||
@@ -13,10 +13,11 @@
|
|||||||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
||||||
# You can create any custom variable you would like, and they will be accessible
|
# You can create any custom variable you would like, and they will be accessible
|
||||||
# in the templates via {{ site.myvariable }}.
|
# in the templates via {{ site.myvariable }}.
|
||||||
title: MySQL database backup
|
title: MySQL Backup Docker container image
|
||||||
email: hi@jonaskaninda.com
|
email: hi@jonaskaninda.com
|
||||||
description: >- # this means to ignore newlines until "baseurl:"
|
description: >- # this means to ignore newlines until "baseurl:"
|
||||||
MySQL Backup and Restore Docker container image. Backup database to AWS S3 storage or SSH remote server.
|
MySQL Backup is a Docker container image that can be used to backup and restore MySQL database.
|
||||||
|
It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, and SSH compatible storage.
|
||||||
|
|
||||||
baseurl: "" # the subpath of your site, e.g. /blog
|
baseurl: "" # the subpath of your site, e.g. /blog
|
||||||
url: "jkaninda.github.io/mysql-bkup/" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "jkaninda.github.io/mysql-bkup/" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ spec:
|
|||||||
# for a list of available releases.
|
# for a list of available releases.
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- backup
|
- backup
|
||||||
- --storage
|
- --storage
|
||||||
@@ -82,6 +84,8 @@ spec:
|
|||||||
# for a list of available releases.
|
# for a list of available releases.
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- backup
|
- backup
|
||||||
- --storage
|
- --storage
|
||||||
@@ -138,6 +142,8 @@ spec:
|
|||||||
# for a list of available releases.
|
# for a list of available releases.
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- restore
|
- restore
|
||||||
- --storage
|
- --storage
|
||||||
@@ -192,6 +198,8 @@ spec:
|
|||||||
- name: mysql-bkup
|
- name: mysql-bkup
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- backup
|
- backup
|
||||||
- --storage
|
- --storage
|
||||||
@@ -258,6 +266,8 @@ spec:
|
|||||||
- name: mysql-bkup
|
- name: mysql-bkup
|
||||||
image: jkaninda/mysql-bkup
|
image: jkaninda/mysql-bkup
|
||||||
command:
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
- bkup
|
- bkup
|
||||||
- backup
|
- backup
|
||||||
- --storage
|
- --storage
|
||||||
|
|||||||
@@ -1,44 +1,50 @@
|
|||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: CronJob
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: bkup-job
|
name: backup
|
||||||
spec:
|
spec:
|
||||||
schedule: "0 1 * * *"
|
template:
|
||||||
jobTemplate:
|
|
||||||
spec:
|
spec:
|
||||||
template:
|
containers:
|
||||||
spec:
|
- name: mysql-bkup
|
||||||
containers:
|
# In production, it is advised to lock your image tag to a proper
|
||||||
- name: mysql-bkup
|
# release version instead of using `latest`.
|
||||||
image: jkaninda/mysql-bkup
|
# Check https://github.com/jkaninda/mysql-bkup/releases
|
||||||
command:
|
# for a list of available releases.
|
||||||
- /bin/sh
|
image: jkaninda/mysql-bkup
|
||||||
- -c
|
command:
|
||||||
- mysql-bkup backup -s s3 --path /custom_path
|
- /bin/sh
|
||||||
env:
|
- -c
|
||||||
- name: DB_PORT
|
- bkup
|
||||||
value: "3306"
|
- backup
|
||||||
- name: DB_HOST
|
- --storage
|
||||||
value: ""
|
- s3
|
||||||
- name: DB_NAME
|
resources:
|
||||||
value: ""
|
limits:
|
||||||
- name: DB_USERNAME
|
memory: "128Mi"
|
||||||
value: ""
|
cpu: "500m"
|
||||||
# Please use secret!
|
env:
|
||||||
- name: DB_PASSWORD
|
- name: DB_PORT
|
||||||
value: ""
|
value: "3306"
|
||||||
- name: ACCESS_KEY
|
- name: DB_HOST
|
||||||
value: ""
|
value: ""
|
||||||
- name: AWS_S3_ENDPOINT
|
- name: DB_NAME
|
||||||
value: "https://s3.amazonaws.com"
|
value: "dbname"
|
||||||
- name: AWS_S3_BUCKET_NAME
|
- name: DB_USERNAME
|
||||||
value: "xxx"
|
value: "username"
|
||||||
- name: AWS_REGION
|
# Please use secret!
|
||||||
value: "us-west-2"
|
- name: DB_PASSWORD
|
||||||
- name: AWS_ACCESS_KEY
|
value: ""
|
||||||
value: "xxxx"
|
- name: AWS_S3_ENDPOINT
|
||||||
- name: AWS_SECRET_KEY
|
value: "https://s3.amazonaws.com"
|
||||||
value: "xxxx"
|
- name: AWS_S3_BUCKET_NAME
|
||||||
- name: AWS_DISABLE_SSL
|
value: "xxx"
|
||||||
value: "false"
|
- name: AWS_REGION
|
||||||
restartPolicy: OnFailure
|
value: "us-west-2"
|
||||||
|
- name: AWS_ACCESS_KEY
|
||||||
|
value: "xxxx"
|
||||||
|
- name: AWS_SECRET_KEY
|
||||||
|
value: "xxxx"
|
||||||
|
- name: AWS_DISABLE_SSL
|
||||||
|
value: "false"
|
||||||
|
restartPolicy: Never
|
||||||
Reference in New Issue
Block a user