前提条件
请先检查kube-system命名空间下是否已经部署了alicloud-monitor-controller,若未部署,请进行旧版本集群升级。
使用方式
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: heapster
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
task: monitoring
k8s-app: heapster
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
serviceAccount: admin
containers:
- name: heapster
image: registry.##REGION##.aliyuncs.com/acs/heapster-amd64:v1.5.1.1
imagePullPolicy: IfNotPresent
command:
- /heapster
- --source=kubernetes:https://kubernetes.default
- --historical-source=influxdb:http://monitoring-influxdb:8086
- --sink=influxdb:http://monitoring-influxdb:8086
- --sink=socket:tcp://monitor.csk.##REGION##.aliyuncs.com:8093?clusterId=##CLUSTER_ID##&public=true
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: alicloud-monitor-controller
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
task: monitoring
k8s-app: alicloud-monitor-controller
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
hostNetwork: true
tolerations:
- effect: NoSchedule
operator: Exists
key: node-role.kubernetes.io/master
- effect: NoSchedule
operator: Exists
key: node.cloudprovider.kubernetes.io/uninitialized
serviceAccount: admin
containers:
- name: alicloud-monitor-controller
image: registry.##REGION##.aliyuncs.com/acs/alicloud-monitor-controller:v1.0.0
imagePullPolicy: IfNotPresent
command:
- /alicloud-monitor-controller
- agent
- --regionId=##REGION##
- --clusterId=##CLUSTER_ID##
- --logtostderr
- --v=4
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。