apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  namespace: prometheus
  labels:
    app: grafana
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      containers:
      - image: grafana/grafana:7.0.5
        name: grafana
        ports:
        - containerPort: 3000
          name: http

---

apiVersion: v1
kind: Service
metadata:
  namespace: prometheus
  name: grafana
  labels:
    app: grafana
spec:
  type: NodePort
  selector:
    app: grafana
  ports:
  - port: 3000
    targetPort: 3000
    name: http
    nodePort: 30000
    protocol: TCP
