Created
July 27, 2020 18:56
-
-
Save iamtheindian/2a66d3e5fcefc67c152fea89ad82f618 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: grafana | |
labels: | |
app: grafana | |
spec: | |
ports: | |
- port: 3000 | |
nodePort: 30001 | |
selector: | |
app: grafana | |
type: NodePort | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: grafana-volume | |
labels: | |
type: local | |
spec: | |
storageClassName: manual | |
capacity: | |
storage: 5Gi | |
accessModes: | |
- ReadWriteOnce | |
hostPath: | |
path: /mnt/test_grafana | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: grafana-pv-claim | |
labels: | |
app: grafana | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 5Gi | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: grafana | |
labels: | |
app: grafana | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: grafana | |
template: | |
metadata: | |
labels: | |
app: grafana | |
spec: | |
containers: | |
- image: vimal13/grafana | |
name: grafana | |
volumeMounts: | |
- name: grafana-persistent-storage | |
mountPath: /var/lib/grafana | |
volumes: | |
- name: grafana-persistent-storage | |
persistentVolumeClaim: | |
claimName: grafana-pv-claim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment