2020.09.04
1. Helm
Helm is the Kubernetes package manager
2. Helm 3.3.1 구성하기
- https://helm.sh/docs/intro/install/
a. Install Helm
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/v3.3.1/scripts/get-helm-3
$ chmod 744 get_helm.sh
$ ./get_helm.sh
Downloading https://get.helm.sh/helm-v3.3.1-darwin-amd64.tar.gz
Preparing to install helm into /usr/local/bin
Password:
helm installed into /usr/local/bin/helm
$ helm version
version.BuildInfo{Version:"v3.3.1", GitCommit:"249e5215cde0c3fa72e27eb7a30e8d55c9696144", GitTreeState:"clean", GoVersion:"go1.14.7"}
$
b. Initialize a Helm Chart Repository
$ helm repo add stable https://kubernetes-charts.storage.googleapis.com/
"stable" has been added to your repositories
% helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com/
$ helm repo update # Make sure we get the latest list of charts
…
$ helm search repo mysql | head
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/mysql 8.5.1 8.0.23 Chart to create a Highly available MySQL cluster
stable/mysql 1.6.9 5.7.30 DEPRECATED - Fast, reliable, scalable, and easy...
stable/mysqldump 2.6.2 2.4.1 DEPRECATED! - A Helm chart to help backup MySQL...
…
$
3. Helm Test
$ helm install stable/mysql --generate-name
…
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
mysql-1599205139 default 1 2020-09-04 16:39:01 +0900 KST deployed mysql-1.6.7 5.7.30
$ k get deployments.apps
NAME READY UP-TO-DATE AVAILABLE AGE
mysql-1599205139 1/1 1 1 66s
$ helm uninstall mysql-1587526989
release "mysql-1587526989" uninstalled
$
4. Helm Command example
$ helm install gpu-helm-charts/dcgm-exporter --generate-name --namespace gpu-monitor \
--set-string nodeSelector."nvidia\\.com/gpu\\.present"=true \
--dry-run --debug
$ helm inspect values bitnami/redis-cluster --version 4.2.5 > redis-cluster.values
$ helm install aicc bitnami/redis-cluster --create-namespace --namespace redis-cluster \
--values redis-cluster.values --version 4.2.5
$ helm get values gitlab -n gitlab > gitlab.yaml
$ helm upgrade gitlab gitlab/gitlab -n gitlab -f gitlab.yaml
5. Helm chart vs Operator
- https://medium.com/@cloudark/kubernetes-operators-and-helm-it-takes-two-to-tango-3ff6dcf65619
✓ Helm takes the templatized YAMLs and the values file and merges them before deploying the merged YAMLs into a cluster.
The package consisting of templatized Kubernetes YAMLs and the values file is called a ‘Helm chart’.
✓ A Kubernetes Operator consists of Kubernetes Custom Resource(s) / API(s) and Kubernetes Custom Controller(s).
The Custom Resources represent an API that takes declarative inputs on the workload being abstracted
and the Custom Controller implements corresponding actions on the workload.
Once deployed, new Custom Resources (e.g. Mysql, Cassandra, etc.) are available to the end users similar to built-in Resources (e.g. Pod, Service, etc.)
✓ Helm is geared towards performing day-1 operations of templatization and deployment of Kubernetes YAMLs — in this case Operator deployment.
Operator is geared towards handling day-2 operations of managing application workloads on Kubernetes.
- Capabilities
'Kubernetes > Install' 카테고리의 다른 글
GPU Operator Install on Ubuntu (0) | 2021.09.21 |
---|---|
GPU Operator on CentOS (0) | 2021.09.21 |
MetalLB (0) | 2021.09.15 |
keepalived, haproxy for K8s (0) | 2021.09.15 |
K8s 구성 - MiniKube on MacOS (0) | 2021.09.14 |
댓글