Cloud Native 7 min read

Master Cloud‑Native Monitoring: Deploy Prometheus Operator with Helm

This guide explains why traditional monitoring falls short in cloud‑native environments and shows step‑by‑step how to install and configure the Prometheus Operator on Kubernetes using Helm, including custom image settings, storage configuration, and verification of the deployed services.

Linux Ops Smart Journey
Linux Ops Smart Journey
Linux Ops Smart Journey
Master Cloud‑Native Monitoring: Deploy Prometheus Operator with Helm

What is Prometheus Operator?

Prometheus Operator is a Kubernetes Operator that provides native deployment and management of Prometheus and related monitoring components.

Key Features

Kubernetes custom resources: Deploy and manage Prometheus, Alertmanager, and related components via CRDs.

Simplified deployment configuration: Configure basic Prometheus settings such as version, persistence, retention policy, and replica settings from native Kubernetes resources.

Prometheus target configuration: Automatically generate monitoring target configurations based on familiar Kubernetes labels without learning Prometheus‑specific configuration language.

Deploy Prometheus Operator

1. Download the Helm chart and push it to a Harbor repository:

<code>$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts --force-update
$ helm pull prometheus-community/kube-prometheus-stack --version 50.3.1
$ helm push kube-prometheus-stack-50.3.1.tgz oci://core.jiaxzeng.com/plugins
Pushed: core.jiaxzeng.com/plugins/kube-prometheus-stack:50.3.1
Digest: sha256:71397b86f144955df242381462e200fdd107de99d57c935cede9b38f67892547</code>

2. Pull the chart on the Kubernetes host:

<code>$ sudo helm pull oci://core.jiaxzeng.com/plugins/kube-prometheus-stack --version 50.3.1 --untar --untardir /etc/kubernetes/addons/</code>

3. Create a custom values file (excerpt):

<code># Custom resource name
fullnameOverride: "monitor"
cleanPrometheusOperatorObjectNames: true

# Custom images
prometheusOperator:
  admissionWebhooks:
    patch:
    image:
      registry: core.jiaxzeng.com
      repository: obs/kube-prometheus-stack/kube-webhook-certgen
prometheusConfigReloader:
  image:
    registry: core.jiaxzeng.com
    repository: obs/kube-prometheus-stack/prometheus-config-reloader
    image:
      registry: core.jiaxzeng.com
      repository: obs/kube-prometheus-stack/prometheus-operator

# kube‑state‑metrics image
kube-state-metrics:
  image:
    registry: core.jiaxzeng.com
    repository: obs/kube-prometheus-stack/kube-state-metrics

# node‑exporter image
prometheus-node-exporter:
  nameOverride: node-exporter
  image:
    registry: core.jiaxzeng.com
    repository: obs/kube-prometheus-stack/node-exporter

# Prometheus image and storage
prometheus:
  prometheusSpec:
    image:
      registry: core.jiaxzeng.com
      repository: obs/kube-prometheus-stack/prometheus
    storage:
      volumeClaimTemplate:
        metadata:
          name: data
        spec:
          storageClassName: longhorn
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 20Gi

# Alertmanager image and storage
alertmanager:
  alertmanagerSpec:
    image:
      registry: core.jiaxzeng.com
      repository: obs/kube-prometheus-stack/alertmanager
    storage:
      volumeClaimTemplate:
        metadata:
          name: data
        spec:
          storageClassName: longhorn
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 10Gi

# Disable Grafana
grafana:
  enabled: false

# Enable collection ports for etcd, controller‑manager, scheduler
kubeEtcd:
  service:
    enabled: true
    port: 12381
    targetPort: 12381
kubeControllerManager:
  service:
    enabled: true
    port: 20257
    targetPort: 20257
kubeScheduler:
  service:
    enabled: true
    port: 20259
    targetPort: 20259</code>

4. Install the operator with Helm:

<code>$ helm install --create-namespace -n obs-system monitor -f /etc/kubernetes/addons/kube-prometheus-stack-values.yaml /etc/kubernetes/addons/kube-prometheus-stack
NAME: monitor
LAST DEPLOYED: Wed Jun 11 10:50:43 2025
NAMESPACE: obs-system
STATUS: deployed
REVISION: 1</code>

Validate the Deployment

Check that all pods are running:

<code>$ k -n obs-system get pod | grep monitor
alertmanager-monitor-0          2/2     Running   0   3h15m
monitor-kube-state-metrics-...  1/1     Running   0   5h1m
... (other pods) ...</code>

Verify that Prometheus has discovered its targets (screenshot below).

Conclusion

Prometheus Operator represents a shift from manual, passive monitoring to declarative, automatic service discovery; combined with ServiceMonitor it enables “monitoring as soon as a service is deployed.”

MonitoringCloud NativeKubernetesOperatorPrometheusHelm
Linux Ops Smart Journey
Written by

Linux Ops Smart Journey

The operations journey never stops—pursuing excellence endlessly.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.