安装heapster

使用主仓库

cd /opt/kubernetes-repo/cluster/addons/cluster-monitoring/influxdb

cat <<EOF | kubectl create -f -
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: heapster
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:heapster
subjects:
- kind: ServiceAccount
  name: heapster
  namespace: kube-system
EOF

kubectl create -f influxdb-grafana-controller.yaml
kubectl create -f grafana-service.yaml
kubectl create -f influxdb-service.yaml
kubectl create -f heapster-service.yaml
pip install jinja2
alias render_template='python -c "from jinja2 import Template; import sys; print(Template(sys.stdin.read()).render());"'
NODECOUNT=`kubectl get nodes | grep -v 'NAME'| wc -l`

heaster 资源基于动态配置

使用heapster仓库

创建rbac

Last updated

Was this helpful?