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

<ol>
<li>First step 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>And Im getting error :</p>

<p><code>error: unable to recognize "1500-prometheus-crd.yaml": no matches for kind "Prometheus" in version "monitoring.coreos.com/v1"</code></p>

<p>I found this <a href="https://github.com/coreos/prometheus-operator/issues/1866" rel="nofollow noreferrer">https://github.com/coreos/prometheus-operator/issues/1866</a> , but I try to do it as mentioned, I.e. 
Wait a few second and deploy again but it doesn’t help. Any idea ? </p>

<p>Also tried to delete the ns and create it again with the configs and I got the same issue. please advice</p>

Jenny M
<p>You need to install the <a href="https://github.com/coreos/prometheus-operator/tree/master/example/prometheus-operator-crd" rel="nofollow noreferrer">custom resources</a> as available objects in Kubernetes before you can create instances of them. </p>
