github.com/galamsiva2020/kubernetes-heapster-monitoring@v0.0.0-20210823134957-3c1baa7c1e70/deploy/kube-config/influxdb/grafana.yaml (about)

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    name: monitoring-grafana
     5    namespace: kube-system
     6  spec:
     7    replicas: 1
     8    template:
     9      metadata:
    10        labels:
    11          task: monitoring
    12          k8s-app: grafana
    13      spec:
    14        containers:
    15        - name: grafana
    16          image: k8s.gcr.io/heapster-grafana-amd64:v5.0.4
    17          ports:
    18          - containerPort: 3000
    19            protocol: TCP
    20          volumeMounts:
    21          - mountPath: /etc/ssl/certs
    22            name: ca-certificates
    23            readOnly: true
    24          - mountPath: /var
    25            name: grafana-storage
    26          env:
    27          - name: INFLUXDB_HOST
    28            value: monitoring-influxdb
    29          - name: GF_SERVER_HTTP_PORT
    30            value: "3000"
    31            # The following env variables are required to make Grafana accessible via
    32            # the kubernetes api-server proxy. On production clusters, we recommend
    33            # removing these env variables, setup auth for grafana, and expose the grafana
    34            # service using a LoadBalancer or a public IP.
    35          - name: GF_AUTH_BASIC_ENABLED
    36            value: "false"
    37          - name: GF_AUTH_ANONYMOUS_ENABLED
    38            value: "true"
    39          - name: GF_AUTH_ANONYMOUS_ORG_ROLE
    40            value: Admin
    41          - name: GF_SERVER_ROOT_URL
    42            # If you're only using the API Server proxy, set this value instead:
    43            # value: /api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
    44            value: /
    45        volumes:
    46        - name: ca-certificates
    47          hostPath:
    48            path: /etc/ssl/certs
    49        - name: grafana-storage
    50          emptyDir: {}
    51  ---
    52  apiVersion: v1
    53  kind: Service
    54  metadata:
    55    labels:
    56      # For use as a Cluster add-on (https://github.com/kubernetes/kubernetes/tree/master/cluster/addons)
    57      # If you are NOT using this as an addon, you should comment out this line.
    58      kubernetes.io/cluster-service: 'true'
    59      kubernetes.io/name: monitoring-grafana
    60    name: monitoring-grafana
    61    namespace: kube-system
    62  spec:
    63    # In a production setup, we recommend accessing Grafana through an external Loadbalancer
    64    # or through a public IP.
    65    # type: LoadBalancer
    66    # You could also use NodePort to expose the service at a randomly-generated port
    67    # type: NodePort
    68    ports:
    69    - port: 80
    70      targetPort: 3000
    71    selector:
    72      k8s-app: grafana