That blog post is about that Prometheus Operator installed from the Community Catalog doesn’t work anymore on a Kubernetes
1.23.6_1527 cluster version.
The impact for me was that my blog posts examples related to the topic metrics don’t work anymore.
- Monitor your custom operator with Prometheus
- Access Prometheus queries using the Prometheus HTTP API
- Example for an installation and an initial configuration of the Grafana operator
In my examples I used the Operator Lifecycle Manager installation that installs the Prometheus operator from OperatorHub.io in the Community Catalog. The Prometheus operator in Community Catalog uses the old version
0.47.0. The following image shows a screenshot of that entry.
Here is how I changed the setup.
- Get the Prometheus Operator running
- Create a Prometheus instance
1. Get the Prometheus Operator running¶
I tried the Quickstart of the Prometheus Operator using the
bundle.yaml deployment. That
bundle.yaml contains 28k lines of code 😉 and contains all specifications of the Kubernetes resources to install the Prometheus operator:
Custom Resource Definitions,
Here is what I changed for the Multi Tenancy Frontend Operator project in the branch
I changed only the namespace definitions in that file from
namespace: default to
namespace: monitoring to ensure that I can use the monitoring namespace for my example and I saved the changes in the prom-bundle-monitoring.yaml file you can take a look into. In my case the prom-bundle-monitoring.yaml configuration uses the
After I applied that bundle file, the Prometheus Operator was installed without any problem in my Kubernetes with the
1.23.6_1527 Version. That means I installed the Prometheus operator without using the Operator Lifecycle Manager installation.
Here is simple used command: (ensure you don’t use
kubectl apply use
kubectl create )
kubectl create prom-bundle-monitoring.yaml
Here you see a simple verification:
kubectl get pods -n monitoring
NAME READY STATUS RESTARTS AGE prometheus-operator-5878fc6567-5sq4s 1/1 Running 0 120m
2. Create a Prometheus instance¶
Now I need to create a Prometheus instance in the same namespace
monitoring as the Prometheus Operator is in. I used my existing
yamls specifications, the only change I made was that I gave all of the Kubernetes resources the name
prometheus-instance to have a clear separation of the Prometheus Operator related Kubernetes resources and the
prometheus-instance related resources.
The following list contains links to resources in the Multi Tenancy Frontend Operator GitHub repository.
The following gif shows an example of the created Kubernetes resources.
You find an automated setup of prometheus for the Multi Tenancy Frontend Operator in the prom-create.sh file.
The bundle.yaml installation works very well and simply.
During my short research I connected the Kubernetes Prometheus operator team on slack. The link to the slack channel I got from the Community support page of the Prometheus operator .The Kubernetes Prometheus team doesn’t support the question related to the Prometheus installation by Community Catalog. So I have chosen the option to install the Prometheus operator with the bundle file.
I hope this was useful to you and let’s see what’s next?
#operatorsdk, #prometheus, #operators