Deployment Guide¶
This guide covers the deployment process for the Qubership Monitoring Operator using Helm.
Legacy Kubernetes Support
If you want to deploy the monitoring-operator
into Kubernetes v1.15 or lower or OpenShift v3.11 or lower, you must work with v1beta1 CRDs manually. For more information see Maintenance Guide: Work with legacy CRDs.
Overview¶
This chart installs Monitoring Operator which can create/configure/manage Prometheus/VictoriaMetrics and related components in Kubernetes/OpenShift.
The default installation includes VictoriaMetrics Operator, AlertManager, Exporters, and configuration for scraping the Kubernetes/OpenShift infrastructure.
Quick Start¶
Basic Installation¶
To install the chart with the release name monitoring-operator
:
Installation with Custom Namespace¶
helm install monitoring-operator charts/monitoring-operator \
--namespace monitoring \
--create-namespace
Installation with Custom Values¶
helm install monitoring-operator charts/monitoring-operator \
--namespace monitoring \
--create-namespace \
--values custom-values.yaml
Ingress Configuration¶
Ingress is enabled by default. You have several options for configuration:
Automatic Host Configuration¶
If you want host
to be installed automatically, specify these parameters:
Ingress host
will be set as <component>-{{ .Values.NAMESPACE }}.{{ .Values.CLOUD_PUBLIC_URL }}
.
Examples: - grafana-monitoring.public_url.com - victoriametrics-monitoring.public_url.com - alertmanager-monitoring.public_url.com
Manual Host Configuration¶
You can specify ingress configuration for each component individually:
grafana:
ingress:
install: true
host: grafana.example.com
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- secretName: grafana-tls
hosts:
- grafana.example.com
victoriametrics:
vmsingle:
ingress:
install: true
host: victoriametrics.example.com
alertmanager:
ingress:
install: false # Disable ingress for AlertManager
Deployment Examples¶
Production Deployment¶
# production-values.yaml
global:
privilegedRights: true
victoriametrics:
vmSingle:
storage:
storageClassName: fast-ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
grafana:
persistence:
enabled: true
storageClassName: fast-ssd
size: 10Gi
ingress:
install: true
host: grafana.production.com
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
alertmanager:
replicas: 3
ingress:
install: true
host: alertmanager.production.com
# Enable additional exporters
blackboxExporter:
install: true
certExporter:
install: true
Deploy with:
helm install monitoring-operator charts/monitoring-operator \
--namespace monitoring \
--create-namespace \
--values production-values.yaml
Development Deployment¶
# development-values.yaml
global:
privilegedRights: true
# Minimal resource allocation
victoriametrics:
vmSingle:
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 1000m
memory: 2Gi
grafana:
ingress:
install: true
host: grafana.dev.local
# Disable some components
blackboxExporter:
install: false
certExporter:
install: false
Deploy with:
helm install monitoring-operator charts/monitoring-operator \
--namespace monitoring-dev \
--create-namespace \
--values development-values.yaml
Cloud-Specific Deployments¶
AWS EKS¶
# aws-values.yaml
publicCloudName: "aws"
victoriametrics:
vmSingle:
storage:
storageClassName: gp3
resources:
requests:
storage: 50Gi
cloudwatchExporter:
install: true
# Use AWS Load Balancer Controller
grafana:
ingress:
install: true
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
Azure AKS¶
# azure-values.yaml
publicCloudName: "azure"
victoriametrics:
vmSingle:
storage:
storageClassName: managed-premium
resources:
requests:
storage: 50Gi
promitorAgentScraper:
install: true
grafana:
ingress:
install: true
annotations:
kubernetes.io/ingress.class: azure/application-gateway
Google GKE¶
# gcp-values.yaml
publicCloudName: "google"
victoriametrics:
vmSingle:
storage:
storageClassName: ssd
resources:
requests:
storage: 50Gi
stackdriverExporter:
install: true
grafana:
ingress:
install: true
annotations:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: monitoring-ip
Upgrading¶
To upgrade the chart with the release name monitoring-operator
:
Upgrade with New Values¶
Upgrade from Specific Version¶
Uninstalling¶
To uninstall the monitoring-operator
deployment:
CRD Cleanup Required
This command removes all Kubernetes components associated with the chart but does not remove CRDs. Deleting CRDs causes the deletion of all resources of their type, including resources from other applications.
Manual CRD Cleanup¶
CRDs created by this chart should be manually cleaned up if needed:
Kubernetes¶
kubectl delete crd grafanas.integreatly.org
kubectl delete crd grafanadashboards.integreatly.org
kubectl delete crd grafanadatasources.integreatly.org
kubectl delete crd grafananotificationchannels.integreatly.org
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd probes.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
kubectl delete crd customscalemetricrules.monitoring.qubership.org
kubectl delete crd platformmonitorings.monitoring.qubership.org
kubectl delete crd vmsingles.operator.victoriametrics.com
kubectl delete crd vmagents.operator.victoriametrics.com
kubectl delete crd vmalertmanagers.operator.victoriametrics.com
kubectl delete crd vmalerts.operator.victoriametrics.com
OpenShift¶
oc delete crd grafanas.integreatly.org
oc delete crd grafanadashboards.integreatly.org
oc delete crd grafanadatasources.integreatly.org
oc delete crd grafananotificationchannels.integreatly.org
oc delete crd alertmanagers.monitoring.coreos.com
oc delete crd alertmanagerconfigs.monitoring.coreos.com
oc delete crd podmonitors.monitoring.coreos.com
oc delete crd probes.monitoring.coreos.com
oc delete crd servicemonitors.monitoring.coreos.com
oc delete crd thanosrulers.monitoring.coreos.com
oc delete crd customscalemetricrules.monitoring.qubership.org
oc delete crd platformmonitorings.monitoring.qubership.org
oc delete crd vmsingles.operator.victoriametrics.com
oc delete crd vmagents.operator.victoriametrics.com
oc delete crd vmalertmanagers.operator.victoriametrics.com
oc delete crd vmalerts.operator.victoriametrics.com
Troubleshooting¶
Common Issues¶
- CRD Installation Failures: Ensure you have sufficient permissions to create CRDs
- Storage Issues: Verify StorageClass exists and has sufficient space
- Network Policies: Check that network policies allow required communication
- Resource Constraints: Ensure cluster has sufficient CPU/Memory resources
Verification Commands¶
# Check pod status
kubectl get pods -n monitoring
# Check CRDs
kubectl get crd | grep -E "(monitoring|victoriametrics|grafana)"
# Check services
kubectl get svc -n monitoring
# Check ingress
kubectl get ingress -n monitoring
Next Steps¶
After successful deployment:
- Post-Deploy Checks - Verify installation
- Configuration - Customize your setup
- Storage - Configure persistent storage
- Component Configuration - Fine-tune individual components