Chắc các bạn từng làm qua kubernetes nhưng chưa đụng tới helm thì thường thắc mắc helm là gì ?
Helm giúp bạn tìm kiếm, chia sẽ và dùng phần mềm đã được built trong kubernetes. Helm giúp bạn quản lý ứng dụng chạy trên kubernetes.
Helm Chart giúp bạn định nghĩa, cài đặt, nâng cấp kubernetes thậm chí đó là một ứng dụng phức tạp chạy trên kubernetes.
Charts dễ dàng tạo, đánh phiên bản, chia sẽ và public ra cộng đồng. Helm là một project của hiệp hội CNCF : https://www.cncf.io/
Cài đặt kubernetes-helm trên MAC :
brew install helm
Mục đích của Helm là gì ?
Như ta đề cập phía trên thì helm là công cụ dùng để quản lý các package kubernetes còn gọi là charts, Helm có thể làm các việc sau:
- Tạo những Charts mới từ ban đầu
- Đóng gói những charts theo dạng lưu trữ tgz
- Kết nối với repo charts nơi mà các charts lưu trữ.
- Quản lý vòng đời phát hành của chart.
Đối với Helm thì có 3 thành phần cơ bản sau:
- chart
- config
- release
Helm client được viết bằng ngôn ngữ GO.
Thư viện của kubernetes client sử dụng để kết nối với kubernetes là sử dụng REST+JSON. Nó lưu trữ thông tin nhạy cảm trong kubernetes cho nên helm không cần phải có database riêng.
Còn file configuration thì viết dưới dạng YAML.
Một số câu lệnh và biến trong helm:
Common actions for Helm:
- helm search: search for charts
- helm pull: download a chart to your local directory to view
- helm install: upload the chart to Kubernetes
- helm list: list releases of charts
Environment variables:
| Name | Description |
|------------------------------------|-----------------------------------------------------------------------------------|
| $HELM_CACHE_HOME | set an alternative location for storing cached files. |
| $HELM_CONFIG_HOME | set an alternative location for storing Helm configuration. |
| $HELM_DATA_HOME | set an alternative location for storing Helm data. |
| $HELM_DEBUG | indicate whether or not Helm is running in Debug mode |
| $HELM_DRIVER | set the backend storage driver. Values are: configmap, secret, memory, postgres |
| $HELM_DRIVER_SQL_CONNECTION_STRING | set the connection string the SQL storage driver should use. |
| $HELM_MAX_HISTORY | set the maximum number of helm release history. |
| $HELM_NAMESPACE | set the namespace used for the helm operations. |
| $HELM_NO_PLUGINS | disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. |
| $HELM_PLUGINS | set the path to the plugins directory |
| $HELM_REGISTRY_CONFIG | set the path to the registry config file. |
| $HELM_REPOSITORY_CACHE | set the path to the repository cache directory |
| $HELM_REPOSITORY_CONFIG | set the path to the repositories file. |
| $KUBECONFIG | set an alternative Kubernetes configuration file (default "~/.kube/config") |
| $HELM_KUBEAPISERVER | set the Kubernetes API Server Endpoint for authentication |
| $HELM_KUBECAFILE | set the Kubernetes certificate authority file. |
| $HELM_KUBEASGROUPS | set the Groups to use for impersonation using a comma-separated list. |
| $HELM_KUBEASUSER | set the Username to impersonate for the operation. |
| $HELM_KUBECONTEXT | set the name of the kubeconfig context. |
| $HELM_KUBETOKEN | set the Bearer KubeToken used for authentication. |
Nhận xét
Đăng nhận xét