当前位置:网站首页>Cloud native monitoring practice (2) monitoring and collection of components outside the TKE cluster

Cloud native monitoring practice (2) monitoring and collection of components outside the TKE cluster

2022-06-24 17:05:00 keke.

stay Series articles (1) in , Realize the use of cloud native monitoring and collection TKE Monitoring indicators of daemons on nodes in the cluster . Next , Further describe how to use cloud native monitoring to collect TKE Monitoring indicators of components outside the cluster , such as Kong.

Premise : Inter-switch communication

Collection plan

Collection plan

1 There are three monitoring configuration portals supported by cloud native monitoring :ServiceMonitors、PodMonitors、RawJobs, among ServiceMonitors Yes k8s In the cluster service Object as target target Of .

2 k8s In the cluster service object , You can create endpoints To relate . Reference resources :https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors

Solution deployment

1 establish service, And manually associate endpoints object .endpoints Object is used to fill in the specific collection address outside the cluster .

The reference example is as follows :

apiVersion: v1
kind: Service
metadata:
  name: kong-monitor
  label:
    app: kong-monitor
spec:
  ports:
    - protocol: TCP
      port: 80
      name: http
      targetPort: 8001
---
apiVersion: v1
kind: Endpoints
metadata:
  name: kong-monitor
subsets:
  - addresses:
      - ip: 192.0.2.42
    ports:
      - port: 8001
        name: http

2 Create on the cloud native monitoring console ServiceMonitors object :

ServiceMonitor

When the appeal process is completed , You can configure grafana The panel .

原网站

版权声明
本文为[keke.]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/03/20210331224807655S.html