Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Prometheus09-k8s deployment grafana

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Deploy grafana

ApiVersion: apps/v1 kind: StatefulSet metadata: name: grafana namespace: kube-systemspec: serviceName: "grafana" replicas: 1 selector: matchLabels: app: grafana template: metadata: labels: app: grafana spec: containers:-name: grafana image: grafana/grafana ports:-containerPort: 3000 protocol: TCP resources: limits: Cpu: 100m memory: 256Mi requests: cpu: 100m memory: 256Mi volumeMounts:-name: grafana-data mountPath: / var/lib/grafana subPath: grafana securityContext: fsGroup: 472runAsUser: 472volumeClaimTemplates:-metadata: name : grafana-data spec: storageClassName: managed-nfs-storage accessModes:-ReadWriteOnce resources: storage: "1Gi"-apiVersion: v1kind: Servicemetadata: name: grafana namespace: kube-systemspec: type: NodePort ports:-port: 80 targetPort: 3000 nodePort: 30007 selector: app: grafana

2.storageclass created it in advance.

[root@kubemaster01 grafana] # kubectl get scNAME PROVISIONER AGEmanaged-nfs-storage fuseim.pri/ifs 4h25m [root@kubemaster01 grafana] #

3. Visit

[root@kubemaster01 grafana] # kubectl get svc-n kube-system NAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEgrafana NodePort 169.169.180.248 80:30007/TCP 6m33s

4. Access to add data sources for drawing

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report