Prometheus CRD not deployed on istio prometheus installation

Hi all,

I am going to run the istio prometheus under a different externalUrl than /.

Therefore I wanted to deploy the following object:

---
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: main
spec:
  replicas: 1
  version: {{ .Release.appVersion }}
  externalUrl: https://istio.domain/prometheus
  resources:
    requests:
      memory: 400Mi

But I get an error message when deploying it that the CRD monitoring.coreos.com is not found on my istio installation.

I found on the web, that the following CRD needs to be deployed: https://github.com/coreos/prometheus-operator/blob/60300f2baf8b02bc86d71672a76420476924af75/example/prometheus-operator-crd/prometheus.crd.yaml

Do I have to deploy that one or how do I get the CRD monitoring.coreos.com on the istio installation?

I installed istio 1.4.0 via the official helm charts.

Thanks in advance.

Best regards,
rforberger

You do need to install the prom operator, if you want to use Prometheus CRs, etc.

Take a look at the istio/installer install scripts, particularly: https://github.com/istio/installer/blob/106d947ff64df8ec05e53ea68cafab099bc60d2e/test/install.mk#L174.

@douglas-reid
Thanks for your info.
Is there also a helm chart for the prometheus operator to deploy in the istio namespace?

The helm chart for the prometheus operator is available in the prometheus operator repository, at the URL in the line I linked to from the installer. Any tailoring of that chart will need to be accomplished outside of Istio, as Istio is not a maintainer of those charts.

The helm charts for the Istio specific prom operator CRs are maintained in istio/installer, and allow for namespace customization.