This file contains 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
apiVersion: v1 | |
data: | |
"3306": mysql/mysql-service:3306 | |
kind: ConfigMap | |
metadata: | |
name: tcp-services | |
namespace: ingress-nginx |
This file contains 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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
ingress.kubernetes.io/force-ssl-redirect: "true" | |
nginx.ingress.kubernetes.io/server-alias: mysql.<YOUR_DOMAIN>.com | |
labels: | |
app: mysql | |
name: mysql |
This file contains 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: mycluster-secret | |
type: Opaque | |
data: | |
ROOT_PASSWORD: "Y2hhbmdlbWU=" |
This file contains 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
apiVersion: mysql.presslabs.org/v1alpha1 | |
kind: MysqlCluster | |
metadata: | |
name: mycluster-standalone | |
spec: | |
mysqlVersion: "5.7" | |
replicas: 1 | |
secretName: mycluster-secret |
This file contains 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: MyCluster-Secret | |
type: Opaque | |
data: | |
ROOT_PASSWORD: "Y2hhbmdtZQ==" | |
--- | |
apiVersion: mysql.presslabs.org/v1alpha1 | |
kind: MysqlCluster |
This file contains 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
helm repo add presslabs https://presslabs.github.io/charts | |
helm update | |
# (helm v2) | |
helm install presslabs/mysql-operator --name mysql-operator --create-namespace | |
# (helm v3) | |
helm install mysql-operator presslabs/mysql-operator -n mysql-operator --create-namespace |
This file contains 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
apiVersion: v1 | |
data: | |
AWS_ACCESS_KEY_ID: # | |
AWS_SECRET_ACCESS_KEY: # | |
AWS_REGION: # | |
S3_PROVIDER: # | |
AZUREBLOB_ACCOUNT: # | |
AZUREBLOB_KEY: # | |
This file contains 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
apiVersion: mysql.presslabs.org/v1alpha1 | |
kind: MysqlBackup | |
metadata: | |
name: mycluster-backup | |
spec: | |
clusterName: mycluster | |
backupURL: s3://<NAME_OF_S3_BUCKET> | |
backupSecretName: mycluster-backup-secret |
This file contains 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
apiVersion: mysql.presslabs.org/v1alpha1 | |
kind: MysqlCluster | |
metadata: | |
name: scheduled-mysqlcluster | |
spec: | |
secretName: mycluster-secret # contains Database credentials | |
backupSchedule: "0 0 0 * * *" # Cron Expression to run dialy backup | |
backupURL: s3://<S3_BUCKET_NAME> # S3 Endpoint to store the backup | |
backupSecretName: mycluster-backup-seceret # Contains Authentication details for Storage Provider | |
backupRemoteDeletePolicy: retain|delete # Backup Retention Policy |
This file contains 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
apiVersion: mysql.presslabs.org/v1alpha1 | |
kind: MysqlCluster | |
metadata: | |
name: mycluster-restored | |
spec: | |
mysqlVersion: "5.7" | |
replicas: 1 | |
secretName: mycluster-secret | |
initBucketURL: s3://<S3_BUCKET_NAME>/mycluster-backup.xbackup.gz | |
initBucketSecretName: mycluster-backup-secret |