<p>I'm trying to  create prometheus with operator in fresh new k8s cluster
I use the following files , </p>

<ol>
<li>I’m creating a namespace  monitoring </li>
<li>Apply this file , which works ok</li>
</ol>

<pre><code>
apiVersion: apps/v1beta2
kind: Deployment
metadata:
  labels:
    k8s-app: prometheus-operator
  name: prometheus-operator
  namespace: monitoring
spec:
  replicas: 2
  selector:
    matchLabels:
      k8s-app: prometheus-operator
  template:
    metadata:
      labels:
        k8s-app: prometheus-operator
    spec:
      priorityClassName: "operator-critical"
      tolerations:
      - key: "WorkGroup"
        operator: "Equal"
        value: "operator"
        effect: "NoSchedule"
      - key: "WorkGroup"
        operator: "Equal"
        value: "operator"
        effect: "NoExecute"
      containers:
      - args:
        - --kubelet-service=kube-system/kubelet
        - --logtostderr=true
        - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
        - --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.29.0
        image: quay.io/coreos/prometheus-operator:v0.29.0
        name: prometheus-operator
        ports:
        - containerPort: 8080
          name: http
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
      nodeSelector:
      serviceAccountName: prometheus-operator
</code></pre>

<p>Now I want  to apply this file (CRD)</p>

<pre><code>apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
  namespace: monitoring
  labels: 
    prometheus: prometheus
spec:
  replica: 1
  priorityClassName: "operator-critical"
  serviceAccountName: prometheus
  nodeSelector:
        worker.garden.sapcloud.io/group: operator
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector:
    matchLabels:
      role: observeable
  tolerations:
  - key: "WorkGroup"
    operator: "Equal"
    value: "operator"
    effect: "NoSchedule"
  - key: "WorkGroup"
    operator: "Equal"
    value: "operator"
    effect: "NoExecute"
</code></pre>

<p>before I've created those CRD</p>

<p><a href="https://github.com/coreos/prometheus-operator/tree/master/example/prometheus-operator-crd" rel="nofollow noreferrer">https://github.com/coreos/prometheus-operator/tree/master/example/prometheus-operator-crd</a></p>

<p>The problem that the <strong>pods didn't able to start</strong> (0/2), see the picture below. What could be the problem?  please advice </p>

<p><a href="https://i.stack.imgur.com/3lwSI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3lwSI.png" alt="enter image description here"></a></p>

<p><strong>update</strong></p>

<p>when I go to the event of the prom operator I see the following Error <code>creating: pods "prometheus-operator-6944778645-" is forbidden: no PriorityClass with name operator-critical was found replicaset-controller</code> , any idea ?</p>

<p>You are trying to reference the <code>operator-critical</code> <a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass" rel="nofollow noreferrer">priority class</a>. Priority classes determine the priority of pods and their resource assignment.</p>

<p>To fix this issue you could either remove the explicit priority class(<code>priorityClassName: "operator-critical"</code>) in both files or create the <code>operator-critical</code> class:</p>

<pre><code>apiVersion: scheduling.k8s.io/v1beta1
kind: PriorityClass
metadata:
  name: operator-critical
value: 1000000
globalDefault: false
description: "Critical operator workloads"
</code></pre>
