Deploy Grafana on Kubernetes Cluster Task Failed

Hello Folks,

I do not know what is the mistake and appreciated if you advised. I have created services and deployment accordingly.

kubeclt create ns grafana-monitoring-nautilus

apiVersion: v1
kind: Service
metadata:
name: grafana-service-nautilus
namespace: grafana-monitoring-nautilus
spec:
ports:

  • name: https
    port: 3000
    protocol: TCP
    targetPort: 3000
    nodePort: 32000
    type: NodePort

    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: grafana-deployment-nautilus
    namespace: grafana-monitoring-nautilus
    labels:
    app: grafana
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: grafana
    template:
    metadata:
    labels:
    app: grafana
    spec:
    containers:
    • name: grafana-container-nautilus
      image: grafana/grafana:latest
      ports:
      • containerPort: 3000
        resources:
        requests:
        memory: “1Gi”
        cpu: “500m”
        limits:
        memory: “2Gi”
        cpu: “1000m”
        volumeMounts:
        • mountPath: /var/lib/grafana
          name: grafana-storage
          volumes:
      • name: grafana-storage
        emptyDir: {}

Even here the YAML formatting is broken.
And I still don’t see a spec.selector in your service definition

@jetchko.jekov Thank you so much for your support. It was success after added the selector.