- helm mariadb install
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm -n pj-ns install my-mariadb bitnami/mariadb
NAME: my-mariadb
LAST DEPLOYED: Tue Jul 4 12:55:19 2023
NAMESPACE: pj-ohs
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: mariadb
CHART VERSION: 12.2.5
APP VERSION: 10.11.4
** Please be patient while the chart is being deployed **
Tip:
Watch the deployment status using the command: kubectl get pods -w --namespace pj-ohs -l app.kubernetes.io/instance=my-mariadb
Services:
echo Primary: my-mariadb.pj-ohs.svc.cluster.local:3306
Administrator credentials:
Username: root
Password : $(kubectl get secret --namespace pj-ohs my-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 -d)
To connect to your database:
1. Run a pod that you can use as a client:
kubectl run my-mariadb-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mariadb:10.11.4-debian-11-r0 --namespace pj-ohs --command -- bash
2. To connect to primary service (read/write):
mysql -h my-mariadb.pj-ohs.svc.cluster.local -uroot -p my_database
To upgrade this helm chart:
1. Obtain the password as described on the 'Administrator credentials' section and set the 'auth.rootPassword' parameter as shown below:
ROOT_PASSWORD=$(kubectl get secret --namespace pj-ohs my-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 -d)
helm upgrade --namespace pj-ohs my-mariadb oci://registry-1.docker.io/bitnamicharts/mariadb --set auth.rootPassword=$ROOT_PASSWORD
728x90
댓글