K8S安装grafana grafana.yaml

Posted 加油、骚年

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了K8S安装grafana grafana.yaml相关的知识,希望对你有一定的参考价值。

K8S安装grafana grafana.yaml

记录一下

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: grafana
  name: grafana
  namespace: efp6-k8s
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 10555
        fsGroup: 10555
      containers:
        - name: grafana
          image: 10.133.0.55:8888/chaos-mesh/grafana@sha256:810a8db3af112d7c870b80f1339adc0986325ead9d3f1e195ae0a5bb5261014e
          imagePullPolicy: Always
          env:
            - name: GF_SECURITY_ADMIN_USER
              value: admin
            - name: GF_SECURITY_ADMIN_PASSWORD
              value: admin
          readinessProbe:
            httpGet:
              path: /login
              port: 3000
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana-data-volume
          ports:
            - containerPort: 3000
              protocol: TCP
      volumes:
        - name: grafana-data-volume
          emptyDir: 
---
kind: Service
apiVersion: v1
metadata:
  labels:
    app: grafana
  name: grafana-service
  namespace: efp6-k8s
spec:
  ports:
    - port: 3000
      targetPort: 3000
  selector:
    app: grafana
  type: NodePort

 

以上是关于K8S安装grafana grafana.yaml的主要内容,如果未能解决你的问题,请参考以下文章

K8S部署Prometheus+Grafana监控集群

k8s笔记12--grafana的配置和常见使用

prometheus+grafana监控K8S容器

k8s安装promethus

Mac下更新brew及安装Prometheus+Grafana

无法使用来自浏览器的入口访问我在 k8s 集群上的 grafana 仪表板