Helm安装

Posted ericnie的技术博客

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Helm安装相关的知识,希望对你有一定的参考价值。

 

在下列网站下载helm的相关版本

https://github.com/kubernetes/helm/releases


tar -xvzf  $HELM.tar.gz 

mv linux-amd64/helm /usr/local/bin/helm

 

在K8s节点上配置.kube/config

[[email protected]1 ~]# kubectl config set-cluster kubernetes --server=http://192.168.0.104:8080
Cluster "kubernetes" set.


[[email protected]-node-1 ~]# kubectl config set-credentials admin
User "admin" set.

[[email protected]-node-1 ~]# kubectl config set-context kubernetes > --cluster=kubernetes > --user=admin
Context "kubernetes" set.


[[email protected]-node-1 ~]# kubectl config use-context kubernetes
Switched to context "kubernetes".

 

运行安装

 

[[email protected]1 ~]# kubectl create serviceaccount --namespace kube-system tiller
serviceaccount "tiller" created
[[email protected]-node-1 ~]# helm init --service-account tiller --skip-refresh
$HELM_HOME has been configured at /root/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Happy Helming!

然后去查看

[[email protected]1 ~]# kubectl get pod -n kube-system -l app=helm
NAME                             READY     STATUS              RESTARTS   AGE
tiller-deploy-3018021184-dxpfj   0/1       ContainerCreating   0          26s
[[email protected]1 ~]# kubectl describe pods tiller-deploy-3018021184-dxpfj -n kube-system
Name:        tiller-deploy-3018021184-dxpfj
Namespace:    kube-system
Node:        k8s-node-1/192.168.0.105
Start Time:    Fri, 23 Feb 2018 18:41:28 +0800
Labels:        app=helm
        name=tiller
        pod-template-hash=3018021184
Status:        Pending
IP:        
Controllers:    ReplicaSet/tiller-deploy-3018021184
Containers:
  tiller:
    Container ID:    
    Image:        gcr.io/kubernetes-helm/tiller:v2.8.1
    Image ID:        
    Ports:        44134/TCP, 44135/TCP
    State:        Waiting
      Reason:        ContainerCreating
    Ready:        False
    Restart Count:    0
    Liveness:        http-get http://:44135/liveness delay=1s timeout=1s period=10s #success=1 #failure=3
    Readiness:        http-get http://:44135/readiness delay=1s timeout=1s period=10s #success=1 #failure=3
    Volume Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from tiller-token-xng0h (ro)
    Environment Variables:
      TILLER_NAMESPACE:        kube-system
      TILLER_HISTORY_MAX:    0
Conditions:
  Type        Status
  Initialized     True 
  Ready     False 
  PodScheduled     True 
Volumes:
  tiller-token-xng0h:
    Type:    Secret (a volume populated by a Secret)
    SecretName:    tiller-token-xng0h
QoS Class:    BestEffort
Tolerations:    <none>
Events:
  FirstSeen    LastSeen    Count    From            SubObjectPath        Type        Reason        Message
  ---------    --------    -----    ----            -------------        --------    ------        -------
  1m        1m        1    {default-scheduler }                Normal        Scheduled    Successfully assigned tiller-deploy-3018021184-dxpfj to k8s-node-1
  1m        1m        1    {kubelet k8s-node-1}    spec.containers{tiller}    Normal        Pulling        pulling image "gcr.io/kubernetes-helm/tiller:v2.8.1"

发现需要gcr.io/kubernetes-helm/tiller:v2.8.1

一番折腾后运行后完成

helm init --service-account tiller --upgrade -i index.tenxcloud.com/kubernetes-helm/tiller:v2.6.0  --skip-refresh

 

明天继续。。。

 

以上是关于Helm安装的主要内容,如果未能解决你的问题,请参考以下文章

k8s 安装helm

helm2和helm3的区别及helm2的安装使用

kubernetes集群安装helm教程

helm chart预定义值

安装 helm2

helm安装及使用