mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			76 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| apiVersion: v1
 | |
| kind: ReplicationController
 | |
| metadata:
 | |
|   name: monitoring-influxdb-grafana-v4
 | |
|   namespace: kube-system
 | |
|   labels: 
 | |
|     k8s-app: influxGrafana
 | |
|     version: v4
 | |
|     kubernetes.io/cluster-service: "true"
 | |
|     addonmanager.kubernetes.io/mode: Reconcile
 | |
| spec: 
 | |
|   replicas: 1
 | |
|   selector: 
 | |
|     k8s-app: influxGrafana
 | |
|     version: v4
 | |
|   template: 
 | |
|     metadata: 
 | |
|       labels: 
 | |
|         k8s-app: influxGrafana
 | |
|         version: v4
 | |
|         kubernetes.io/cluster-service: "true"
 | |
|     spec: 
 | |
|       containers: 
 | |
|         - image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
 | |
|           name: influxdb
 | |
|           resources:
 | |
|             # keep request = limit to keep this container in guaranteed class
 | |
|             limits:
 | |
|               cpu: 100m
 | |
|               memory: 500Mi
 | |
|             requests:
 | |
|               cpu: 100m
 | |
|               memory: 500Mi
 | |
|           ports: 
 | |
|             - containerPort: 8083
 | |
|             - containerPort: 8086
 | |
|           volumeMounts:
 | |
|           - name: influxdb-persistent-storage
 | |
|             mountPath: /data
 | |
|         - image: gcr.io/google_containers/heapster-grafana-amd64:v4.0.2
 | |
|           name: grafana
 | |
|           env:
 | |
|           resources:
 | |
|             # keep request = limit to keep this container in guaranteed class
 | |
|             limits:
 | |
|               cpu: 100m
 | |
|               memory: 100Mi
 | |
|             requests:
 | |
|               cpu: 100m
 | |
|               memory: 100Mi
 | |
|           env:
 | |
|             # This variable is required to setup templates in Grafana.
 | |
|             - name: INFLUXDB_SERVICE_URL
 | |
|               value: http://monitoring-influxdb:8086
 | |
|               # The following env variables are required to make Grafana accessible via
 | |
|               # the kubernetes api-server proxy. On production clusters, we recommend
 | |
|               # removing these env variables, setup auth for grafana, and expose the grafana
 | |
|               # service using a LoadBalancer or a public IP.
 | |
|             - name: GF_AUTH_BASIC_ENABLED
 | |
|               value: "false"
 | |
|             - name: GF_AUTH_ANONYMOUS_ENABLED
 | |
|               value: "true"
 | |
|             - name: GF_AUTH_ANONYMOUS_ORG_ROLE
 | |
|               value: Admin
 | |
|             - name: GF_SERVER_ROOT_URL
 | |
|               value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
 | |
|           volumeMounts:
 | |
|           - name: grafana-persistent-storage
 | |
|             mountPath: /var
 | |
|       volumes:
 | |
|       - name: influxdb-persistent-storage
 | |
|         emptyDir: {}
 | |
|       - name: grafana-persistent-storage
 | |
|         emptyDir: {}
 | |
| 
 |