title: Kubernetes kind of objects and Prometheus operator
body: <p>Please help me to understand one thing about <code>Prometheus</code> and <code>Prometheus operator</code> integration into Kubernetes.</p>
  
  <p>From the documentation I see that a new and not standard kinds of Kubernetes objects are used to configure <code>Prometheus operator</code>. By standard kinds I mean <code>Pod</code>, <code>Service</code>, <code>ReplicaSet</code>, <code>Deployment</code> etc. How the new like <code>PrometheusRule</code> and <code>Prometheus</code> was created? There is a point of integration here?</p>
  
  <p>The documentation which brings me to this questions is here <a href="https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md" rel="nofollow noreferrer">https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md</a></p>
  
  <p>The example of this kind of Kubernetes object YAML</p>
  
  <pre><code>apiVersion: monitoring.coreos.com/v1
  kind: Prometheus
  metadata:
    name: example
  spec:
    replicas: 2
    alerting:
      alertmanagers:
      - namespace: default
        name: alertmanager-example
        port: web
    serviceMonitorSelector:
      matchLabels:
        team: frontend
    ruleSelector:
      matchLabels:
        role: alert-rules
        prometheus: example
  </code></pre>