helm学习

Ethereal Lv4

1. 版本对应

与k8s的版本对应是使用helm的前提

Helm版本支持策略

官方文档给出的版本较为老旧,可以从github获取:https://github.com/helm/helm/releases

但是,始终满足如下关系:

2. 添加仓库

# 先移除原先的仓库
helm repo remove stable
# 添加新的仓库地址
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
# 更新仓库
helm repo update

不添加仓库也可以正常运行,但是后续建议将包全部导入仓库中

3. 架构

Helm入门(一篇就够了)-阿里云开发者社区

Helm的安装使用_helm install 本地-CSDN博客

www.cnblogs.com

  • values.yaml

定义一些环境变量,这些变量将会导入到template文件夹中的文件里。

  • template

对于此文件夹中的每个文件,都会将环境变量导入,并且执行一些函数。

流控制

helm中template与include区别_helm include-CSDN博客

chart开发提示和技巧

调试模板 (helm template –debug)

  • 变量

此处,变量不同于values.yaml中的环境变量,而是可以在运行中赋值的元素

变量

  • Chart.yaml

定义依赖以及镜像版本,注意,此处镜像的版本将会被应用到templates中,而不是在templates中定义镜像版本(或tag)

子chart和全局值

Helm 依赖

Helm系列-Helm命令之helm dependency依赖管理_helm dependencies-CSDN博客

Helm3 Chart 多依赖微服务构建案例_helm依赖其他的chart-CSDN博客

4. 其他命令

1
2
3
4
helm install ips-server ips-server/ -n dev-ips-server
helm uninstall ips-server -n dev-ips-server
helm list -n dev-ips-server
helm template --debug
  • Title: helm学习
  • Author: Ethereal
  • Created at: 2024-09-24 16:12:06
  • Updated at: 2024-09-24 16:16:31
  • Link: https://ethereal-o.github.io/2024/09/24/helm学习/
  • License: This work is licensed under CC BY-NC-SA 4.0.
 Comments