安装helm

helm是Kubernetes集群的npm。

下载脚本add_helm.sh

脚本内容如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

echo "install helm"
# installs helm with bash commands for easier command line integration
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
# add a service account within a namespace to segregate tiller
kubectl --namespace kube-system create sa tiller
# create a cluster role binding for tiller
kubectl create clusterrolebinding tiller \
    --clusterrole cluster-admin \
    --serviceaccount=kube-system:tiller

echo "initialize helm"
# initialized helm within the tiller service account
helm init --service-account tiller
# updates the repos for Helm repo integration
helm repo update

echo "verify helm"
# verify that helm is installed in the cluster
kubectl get deploy,svc tiller-deploy -n kube-system

执行脚本安装helm

1
sh add_helm.sh

安装kube-eagle

主要体验一下helm使用(刚开始我都是自己手动安装Prometheus)。

添加repo

1
helm repo add kube-eagle https://raw.githubusercontent.com/google-cloud-tools/kube-eagle-helm-chart/master

更新repo

1
helm repo update

安装kube-eagle

1
helm install --name=kube-eagle kube-eagle/kube-eagle

可视化

具体如下:

集群总体及各节点CPU信息

各容器CPU及各节点内存信息

整体集群的资源使用情况是不是一目了然了?

参考

  1. Kube Eagle Helm Chart
  2. Kube Eagle Dashboard