• 云原生 | Kubernetes - 国内镜像部署Helm


    目录

    零、查看对应版本 

    一、下载

    二、安装部署

    三、配置仓库


    零、查看对应版本 

    Helm | Helm版本支持策略

    Helm 版本支持的 Kubernetes 版本
    3.9.x1.24.x - 1.21.x
    3.8.x1.23.x - 1.20.x
    3.7.x1.22.x - 1.19.x
    3.6.x1.21.x - 1.18.x
    3.5.x1.20.x - 1.17.x
    3.4.x1.19.x - 1.16.x
    3.3.x1.18.x - 1.15.x
    3.2.x1.18.x - 1.15.x
    3.1.x1.17.x - 1.14.x
    3.0.x1.16.x - 1.13.x
    2.16.x1.16.x - 1.15.x
    2.15.x1.15.x - 1.14.x
    2.14.x1.14.x - 1.13.x
    2.13.x1.13.x - 1.12.x
    2.12.x1.12.x - 1.11.x
    2.11.x1.11.x - 1.10.x
    2.10.x1.10.x - 1.9.x
    2.9.x1.10.x - 1.9.x
    2.8.x1.9.x - 1.8.x
    2.7.x1.8.x - 1.7.x
    2.6.x1.7.x - 1.6.x
    2.5.x1.6.x - 1.5.x
    2.4.x1.6.x - 1.5.x
    2.3.x1.5.x - 1.4.x
    2.2.x1.5.x - 1.4.x
    2.1.x1.5.x - 1.4.x
    2.0.x1.4.x - 1.3.x

    一、下载

    国内镜像下载地址:Index of helm-local

    根据自己的版本需求来下载:

    helm-v版本号-linux-amd64.tar.gz

    下载完丢到服务器上即可:


    二、安装部署

    tar -zxvf helm-v3.6.0-linux-amd64.tar.gz
    cp -a linux-amd64/helm /usr/local/bin/
    chmod a+x /usr/local/bin/helm

    因为Helm3里面已经移除了tiller,所以安装到这里就搞定了,如果你安装的是helm2,那请继续往下:

    创建 rbac-config.yaml 文件:

    1. apiVersion: v1
    2. kind: ServiceAccount
    3. metadata:
    4. name: tiller
    5. namespace: kube-system
    6. ---
    7. apiVersion: rbac.authorization.k8s.io/v1beta1
    8. kind: ClusterRoleBinding
    9. metadata:
    10. name: tiller
    11. roleRef:
    12. apiGroup: rbac.authorization.k8s.io
    13. kind: ClusterRole
    14. name: cluster-admin
    15. subjects:
    16. - kind: ServiceAccount
    17. name: tiller
    18. namespace: kube-system
    kubectl create -f rbac-config.yaml
    helm init --service-account tiller --skip-refresh

    三、配置仓库

    添加常用 chart 仓库:

    1. helm repo add bitnami https://charts.bitnami.com/bitnami
    2. helm repo add stable http://mirror.azure.cn/kubernetes/charts
    3. helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
    4. helm repo add incubator https://charts.helm.sh/incubator

    更新chart仓库:

    1. helm repo update
    2. helm repo list

    删除 incubator 仓库:

    helm repo remove incubator

    查看配置的 chart 仓库有哪些:

    helm repo list

    从指定 chart 仓库地址搜索 chart:

    helm search repo aliyun | grep 名称

    安装 chart:

    1. #指定 release 的名字为 my-redis,-n 指定部署到 k8s 的 namespace
    2. helm install my-redis bitnami/redis [-n default
    1. #不指定 release 的名字时,需使用 –generate-name 随机生成一个名字
    2. helm install bitnami/redis --generate-name

    查看所有 release:

    helm ls

    查看指定的 release 状态:

    helm status my-redis

     删除指定的 release:

    helm uninstall my-redis

  • 相关阅读:
    阿里云无法使用高级权限账户打开定时任务开关的解决办法
    glibc 里的线程 id
    渗透测试-CNA_Bshell程序
    OpenCV11-图像的模版匹配
    【自然语言处理】自然语言处理NLP概述及应用
    统计 boy girl 复制出来多少次。 浴谷 P1321题
    用DIV+CSS技术设计的公益主题网站——防止电信诈骗(web前端网页制作课作业)
    经纬恒润汽车电子研发新成果亮相重庆智博会
    习题:循环结构(二)
    three.js之缓冲类型几何体顶点
  • 原文地址:https://blog.csdn.net/Trollz/article/details/127783440