Bitnami: Bitnami는 가상 어플라이언스 및 웹 애플리케이션, 개발 스택용 소프트웨어 패키지 및 설치 라이브러리이다
# 저장소 추가
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
# 목록 업데이트
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm search repo bitnami
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/airflow 15.0.5 2.7.1 Apache Airflow is a tool to express and execute...
bitnami/apache 10.1.2 2.4.57 Apache HTTP Server is an open-source HTTP serve...
bitnami/apisix 2.1.2 3.5.0 Apache APISIX is high-performance, real-time AP...
bitnami/appsmith 1.0.4 1.9.37 Appsmith is an open source platform for buildin...
bitnami/argo-cd 5.1.3 2.8.3 Argo CD is a continuous delivery tool for Kuber...
bitnami/argo-workflows 5.4.3 3.4.11 Argo Workflows is meant to orchestrate Kubernet...
bitnami/aspnet-core 4.4.2 7.0.11 ASP.NET Core is an open-source framework for we...
bitnami/cassandra 10.5.3 4.1.3 Apache Cassandra is an open source distributed ...
bitnami/cert-manager 0.12.4 1.13.0 cert-manager is a Kubernetes add-on to automate...
bitnami/clickhouse 4.0.1 23.8.2 ClickHouse is an open-source column-oriented OL...
bitnami/common 2.11.1 2.11.1 A Library Helm Chart for grouping common logic ...
bitnami/concourse 2.3.6 7.10.0 Concourse is an automation system written in Go...
bitnami/consul 10.13.3 1.16.1 HashiCorp Consul is a tool for discovering and ...
bitnami/contour 13.0.0 1.26.0 Contour is an open source Kubernetes ingress co...
bitnami/contour-operator 4.2.1 1.24.0 DEPRECATED The Contour Operator extends the Kub...
bitnami/dataplatform-bp2 12.0.5 1.0.1 DEPRECATED This Helm chart can be used for the ...
bitnami/deepspeed 1.2.3 0.10.3 DeepSpeed is deep learning software suite for e...
bitnami/discourse 11.0.3 3.1.1 Discourse is an open source discussion platform...
bitnami/dokuwiki 14.2.2 20230404.1.0 DokuWiki is a standards-compliant wiki optimize...
bitnami/drupal 15.1.3 10.1.3 Drupal is one of the most versatile open source...
bitnami/ejbca 9.0.1 8.0.20230531 EJBCA is an enterprise class PKI Certificate Au...
bitnami/elasticsearch 19.11.3 8.10.0 Elasticsearch is a distributed search and analy...
bitnami/etcd 9.5.0 3.5.9 etcd is a distributed key-value store designed ...
bitnami/external-dns 6.26.1 0.13.6 ExternalDNS is a Kubernetes addon that configur...
bitnami/flink 0.4.2 1.17.1 Apache Flink is a framework and distributed pro...
bitnami/fluent-bit 0.5.2 2.1.9 Fluent Bit is a Fast and Lightweight Log Proces...
# 네임스페이스 생성
imkunyoung@cloudshell:~ (kubernetes-397511)$ kubectl create ns mysql
namespace/mysql created
# 헬름 차트로 mysql 배포
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm install mysqlname bitnami/mysql -n mysql
NAME: mysqlname
LAST DEPLOYED: Tue Sep 19 02:24:17 2023
NAMESPACE: mysql
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: mysql
CHART VERSION: 9.12.2
APP VERSION: 8.0.34
** Please be patient while the chart is being deployed **
Tip:
Watch the deployment status using the command: kubectl get pods -w --namespace mysql
Services:
echo Primary: mysqlname.mysql.svc.cluster.local:3306
Execute the following to get the administrator credentials:
echo Username: root
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace mysql mysqlname -o jsonpath="{.data.mysql-root-password}" | base64 -d)
To connect to your database:
1. Run a pod that you can use as a client:
kubectl run mysqlname-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mysql:8.0.34-debian-11-r31 --namespace mysql --env MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD --command -- bash
2. To connect to primary service (read/write):
mysql -h mysqlname.mysql.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"
# 헬름 통해 구성된 워크로드,
imkunyoung@cloudshell:~ (kubernetes-397511)$ kubectl get all -n mysql
NAME READY STATUS RESTARTS AGE
pod/mysqlname-0 1/1 Running 0 8m6s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/mysqlname ClusterIP 10.44.10.42 <none> 3306/TCP 8m6s
service/mysqlname-headless ClusterIP None <none> 3306/TCP 8m6s
NAME READY AGE
statefulset.apps/mysqlname 1/1 8m7s
mysql 컨테이너가 올라왔는지 확인
imkunyoung@cloudshell:~ (kubernetes-397511)$ kubectl get pods -n mysql
NAME READY STATUS RESTARTS AGE
mysqlname-0 1/1 Running 0 2m15s
mysql의 root 패스워드는 아래와 같이 확인
imkunyoung@cloudshell:~ (kubernetes-397511)$ kubectl get secret -n mysql
NAME TYPE DATA AGE
mysqlname Opaque 2 4m58s
sh.helm.release.v1.mysqlname.v1 helm.sh/release.v1 1 4m59s
imkunyoung@cloudshell:~ (kubernetes-397511)$ kubectl get secret mysqlname -n mysql -o yaml
apiVersion: v1
data:
mysql-password: alVoUE9EMW5YeQ==
mysql-root-password: akpPQ0NZa0tkMA==
kind: Secret
metadata:
annotations:
meta.helm.sh/release-name: mysqlname
meta.helm.sh/release-namespace: mysql
creationTimestamp: "2023-09-19T02:24:24Z"
labels:
app.kubernetes.io/instance: mysqlname
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: mysql
helm.sh/chart: mysql-9.12.2
name: mysqlname
namespace: mysql
resourceVersion: "8190276"
uid: d89dcb56-5754-49eb-ad39-39856093aa3d
type: Opaque
리스트 확인하기
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm list -A
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
mysqlname mysql 1 2023-09-19 02:24:17.037549476 +0000 UTC deployed mysql-9.12.2 8.0.34
상태 확인하기
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm status mysqlname -n mysql
NAME: mysqlname
LAST DEPLOYED: Tue Sep 19 02:24:17 2023
NAMESPACE: mysql
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: mysql
CHART VERSION: 9.12.2
APP VERSION: 8.0.34
** Please be patient while the chart is being deployed **
Tip:
Watch the deployment status using the command: kubectl get pods -w --namespace mysql
Services:
echo Primary: mysqlname.mysql.svc.cluster.local:3306
Execute the following to get the administrator credentials:
echo Username: root
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace mysql mysqlname -o jsonpath="{.data.mysql-root-password}" | base64 -d)
To connect to your database:
1. Run a pod that you can use as a client:
kubectl run mysqlname-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mysql:8.0.34-debian-11-r31 --namespace mysql --env MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD --command -- bash
2. To connect to primary service (read/write):
mysql -h mysqlname.mysql.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"
배포된 패키지는 uninstall 명령으로 삭제
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm list -A
heNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
mysqlname mysql 1 2023-09-19 02:24:17.037549476 +0000 UTC deployed mysql-9.12.2 8.0.34
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm uninstall mysqlname -n mysql
release "mysqlname" uninstalled
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm list -n mysql
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo remove bitnami
"bitnami" has been removed from your repositories
imkunyoung@cloudshell:~ (kubernetes-397511)$ helm repo list
Error: no repositories to show