Created
September 13, 2023 03:50
-
-
Save jei0486/db6af4e12af4a222b302685c04700d2d to your computer and use it in GitHub Desktop.
MySQL helm values.yaml (AWS LoadBalancer, Standalone , Replication)
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 standalone | |
helm install mysql-standalone -n mysql bitnami/mysql -f mysql-standalone.yaml --version 9.10.08 --create-namespace | |
# helm replication | |
helm install mysql-replication -n mysql bitnami/mysql -f mysql-replication.yaml --version 9.10.08 --create-namespace | |
## | |
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace mysql mysql-standalone -o jsonpath="{.data.mysql-root-password}" | base64 -d) | |
# 1. Run a pod that you can use as a client: | |
kubectl run dev-mysql-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mysql:8.0.34-debian-11-r8 \ | |
--namespace mysql --env MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD --command -- bash | |
# 2. To connect to primary service (read/write): | |
mysql -h mysql-standalone.mysql.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD" |
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
global: | |
image: | |
registry: docker.io | |
repository: bitnami/mysql | |
tag: 8.0.34-debian-11-r8 | |
architecture: replication | |
auth: | |
rootPassword: "Standalone1234!" | |
createDatabase: true | |
database: "test_db" | |
username: "test" | |
password: "Test1234" | |
replicationUser: "root" | |
replicationPassword: "Replication1234!" | |
primary: | |
name: primary | |
persistence: | |
enabled: true | |
size: 10Gi | |
service: | |
type: LoadBalancer | |
ports: | |
mysql: 3306 | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing | |
service.beta.kubernetes.io/aws-load-balancer-type: external | |
configuration: |- | |
[mysqld] | |
default_authentication_plugin=mysql_native_password | |
skip-name-resolve | |
explicit_defaults_for_timestamp | |
basedir=/opt/bitnami/mysql | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
datadir=/bitnami/mysql/data | |
tmpdir=/opt/bitnami/mysql/tmp | |
max_allowed_packet=16M | |
bind-address=* | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid | |
log-error=/opt/bitnami/mysql/logs/mysqld.log | |
character-set-server=UTF8 | |
collation-server=utf8_general_ci | |
slow_query_log=0 | |
long_query_time=10.0 | |
[client] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
default-character-set=UTF8 | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
[manager] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid | |
secondary: | |
name: secondary | |
replicaCount: 1 | |
persistence: | |
enabled: true | |
size: 10Gi | |
service: | |
type: LoadBalancer | |
ports: | |
mysql: 3306 | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing | |
service.beta.kubernetes.io/aws-load-balancer-type: external | |
configuration: |- | |
[mysqld] | |
default_authentication_plugin=mysql_native_password | |
skip-name-resolve | |
explicit_defaults_for_timestamp | |
basedir=/opt/bitnami/mysql | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
datadir=/bitnami/mysql/data | |
tmpdir=/opt/bitnami/mysql/tmp | |
max_allowed_packet=16M | |
bind-address=* | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid | |
log-error=/opt/bitnami/mysql/logs/mysqld.log | |
character-set-server=UTF8 | |
collation-server=utf8_general_ci | |
slow_query_log=0 | |
long_query_time=10.0 | |
[client] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
default-character-set=UTF8 | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
[manager] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid | |
metrics: | |
enabled: true |
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
global: | |
image: | |
registry: docker.io | |
repository: bitnami/mysql | |
tag: 8.0.34-debian-11-r8 | |
architecture: standalone | |
auth: | |
rootPassword: "Standalone1234!" | |
createDatabase: true | |
database: "test_db" | |
username: "test" | |
password: "Test1234" | |
primary: | |
name: primary | |
persistence: | |
enabled: true | |
size: 10Gi | |
service: | |
type: LoadBalancer | |
ports: | |
mysql: 3306 | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing | |
service.beta.kubernetes.io/aws-load-balancer-type: external | |
configuration: |- | |
[mysqld] | |
default_authentication_plugin=mysql_native_password | |
skip-name-resolve | |
explicit_defaults_for_timestamp | |
basedir=/opt/bitnami/mysql | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
datadir=/bitnami/mysql/data | |
tmpdir=/opt/bitnami/mysql/tmp | |
max_allowed_packet=16M | |
bind-address=* | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid | |
log-error=/opt/bitnami/mysql/logs/mysqld.log | |
character-set-server=UTF8 | |
collation-server=utf8_general_ci | |
slow_query_log=0 | |
long_query_time=10.0 | |
[client] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
default-character-set=UTF8 | |
plugin_dir=/opt/bitnami/mysql/lib/plugin | |
[manager] | |
port=3306 | |
socket=/opt/bitnami/mysql/tmp/mysql.sock | |
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment