首先安装helm
参见以前blog
Error: release metricbeat failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "default"
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
解决权限问题
安装metric
- Add the elastic helm charts repo
helm repo add elastic https://helm.elastic.co
- Install it
helm install --name metricbeat elastic/metricbeat