Upgrading Kepler Operator
October 14, 2025 ยท View on GitHub
This guide explains how to upgrade Kepler Operator on both Kubernetes (using Helm) and OpenShift (using OLM).
Pre-Upgrade Checklist
Before upgrading, ensure you:
-
Review release notes for breaking changes and new features
-
Backup PowerMonitor resources:
kubectl get powermonitor power-monitor -o yaml > powermonitor-backup.yaml -
Verify current version:
# Kubernetes (Helm) helm list -n kepler-operator # OpenShift (OLM) oc get csv -n openshift-operators | grep kepler -
Review current configuration to ensure it's compatible with the new version
Upgrading on Kubernetes (Helm)
Check Available Versions
From Helm repository (if using a chart repository):
helm repo update
helm search repo kepler-operator --versions
From packaged chart:
Check available chart versions in releases or your chart storage.
Upgrade Procedure
Option 1: Using Makefile (from source)
# Ensure you're on the desired version branch or tag
git fetch --all --tags
git checkout v<version> # e.g., v0.21.0
# Upgrade
make helm-install
The helm-install target uses helm upgrade --install, which upgrades if already installed.
Option 2: Using Helm Directly
# Upgrade to specific version
helm upgrade kepler-operator ./manifests/helm/kepler-operator \
--namespace kepler-operator \
--timeout 5m \
--wait
With custom values:
helm upgrade kepler-operator ./manifests/helm/kepler-operator \
--namespace kepler-operator \
--values custom-values.yaml \
--timeout 5m \
--wait
From packaged chart:
helm upgrade kepler-operator kepler-operator-<new-version>.tgz \
--namespace kepler-operator \
--timeout 5m \
--wait
Monitor the Upgrade
Watch the operator deployment:
kubectl rollout status deployment/kepler-operator-controller -n kepler-operator
Check operator pods:
kubectl get pods -n kepler-operator
Verify Upgrade
-
Check Helm release version:
helm list -n kepler-operator -
Verify operator version:
kubectl get deployment kepler-operator-controller -n kepler-operator -o jsonpath='{.spec.template.spec.containers[0].image}' -
Check PowerMonitor status:
kubectl get powermonitor -
Verify Kepler DaemonSet:
kubectl get daemonset -A | grep power-monitor kubectl rollout status daemonset/power-monitor -n <namespace>
Rollback (if needed)
If the upgrade fails or causes issues:
# List release history
helm history kepler-operator -n kepler-operator
# Rollback to previous version
helm rollback kepler-operator -n kepler-operator
Or rollback to a specific revision:
helm rollback kepler-operator <revision-number> -n kepler-operator
Upgrading on OpenShift (OLM)
OpenShift uses Operator Lifecycle Manager (OLM) for upgrades.
Automatic vs Manual Approval
Check your current approval strategy:
oc get subscription kepler-operator -n openshift-operators -o jsonpath='{.spec.installPlanApproval}'
Automatic: Upgrades happen automatically when new versions are availableManual: Upgrades require manual approval
Automatic Upgrades
If installPlanApproval: Automatic, upgrades happen automatically:
- OLM detects new operator version in catalog
- Creates an InstallPlan
- Automatically approves and executes the upgrade
- Operator is upgraded with no manual intervention
Monitor automatic upgrade:
# Watch CSV status
oc get csv -n openshift-operators -w | grep kepler
# Check install plans
oc get installplan -n openshift-operators
Manual Upgrades
If installPlanApproval: Manual, you must approve upgrades:
Via OpenShift Web Console
- Navigate to Operators โ Installed Operators
- Select Kepler Operator
- Look for Upgrade available notification
- Click Upgrade or Preview InstallPlan
- Review changes
- Click Approve to start the upgrade
Via CLI
-
List pending install plans:
oc get installplan -n openshift-operatorsLook for plans with
APPROVED: false. -
Describe the install plan to review changes:
oc describe installplan <install-plan-name> -n openshift-operators -
Approve the install plan:
oc patch installplan <install-plan-name> \ --namespace openshift-operators \ --type merge \ --patch '{"spec":{"approved":true}}' -
Monitor the upgrade:
oc get csv -n openshift-operators -w | grep kepler
Change Approval Strategy
To change from manual to automatic (or vice versa):
# Switch to automatic
oc patch subscription kepler-operator \
--namespace openshift-operators \
--type merge \
--patch '{"spec":{"installPlanApproval":"Automatic"}}'
# Switch to manual
oc patch subscription kepler-operator \
--namespace openshift-operators \
--type merge \
--patch '{"spec":{"installPlanApproval":"Manual"}}'
Verify Upgrade on OpenShift
-
Check CSV version:
oc get csv -n openshift-operators | grep keplerThe new version should show
Succeededstatus. -
Verify operator pod:
oc get pods -n openshift-operators | grep kepler-operator -
Check PowerMonitor status:
oc get powermonitor -
Verify Kepler DaemonSet:
oc get daemonset -A | grep power-monitor
Post-Upgrade Tasks
After upgrading on either platform:
Verify Operator Health
# Check operator logs
kubectl logs -n kepler-operator deployment/kepler-operator-controller --tail=50
# Or on OpenShift
oc logs -n openshift-operators deployment/kepler-operator-controller --tail=50
Look for errors or warnings.
Verify PowerMonitor Status
kubectl get powermonitor power-monitor -o wide
Check that the PowerMonitor shows healthy status:
kubectl describe powermonitor power-monitor
Look for:
Reconciled: TrueAvailable: True- No error conditions
Verify Kepler DaemonSet
kubectl get daemonset -A | grep power-monitor
Ensure:
DESIRED=CURRENT=READY=UP-TO-DATE- All Kepler pods are running
Test Metrics Collection
Verify metrics are still being collected:
# Port-forward to a Kepler pod
kubectl port-forward -n <namespace> daemonset/power-monitor 28282:28282
# Query metrics
curl http://localhost:28282/metrics | grep kepler_node
Or check in Prometheus/Grafana for recent metrics.
Update PowerMonitor (if needed)
If the new operator version requires PowerMonitor configuration changes:
kubectl edit powermonitor power-monitor
Or apply updated YAML:
kubectl apply -f updated-powermonitor.yaml
Troubleshooting Upgrades
Upgrade Stuck or Failing
Kubernetes (Helm):
-
Check Helm release status:
helm status kepler-operator -n kepler-operator -
View Helm history:
helm history kepler-operator -n kepler-operator -
Check operator logs:
kubectl logs -n kepler-operator deployment/kepler-operator-controller -
If stuck, try forcing upgrade:
helm upgrade kepler-operator ./manifests/helm/kepler-operator \ --namespace kepler-operator \ --force \ --wait
OpenShift (OLM):
-
Check CSV status:
oc describe csv <csv-name> -n openshift-operators -
Check install plan:
oc get installplan -n openshift-operators oc describe installplan <install-plan-name> -n openshift-operators -
Check operator logs:
oc logs -n openshift-operators deployment/kepler-operator-controller
PowerMonitor Not Updating
If PowerMonitor resources don't update after operator upgrade:
-
Check operator is running new version
-
Manually trigger reconciliation by adding an annotation:
kubectl annotate powermonitor power-monitor \ reconcile-trigger="$(date +%s)" -
Check operator logs for reconciliation errors
Kepler Pods Not Updating
If Kepler DaemonSet pods don't update:
-
Manually restart DaemonSet:
kubectl rollout restart daemonset/power-monitor -n <namespace> -
Check DaemonSet status:
kubectl describe daemonset power-monitor -n <namespace> -
Check pod status:
kubectl describe pods -l app.kubernetes.io/name=power-monitor-exporter -n <namespace>
For more troubleshooting, see the Troubleshooting Guide.
Best Practices
- Test in non-production first: Upgrade in development/staging before production
- Review release notes carefully: Understand breaking changes and new features
- Backup before upgrading: Save PowerMonitor configurations
- Monitor during upgrade: Watch logs and status during the upgrade process
- Upgrade during maintenance window: Schedule upgrades during low-traffic periods
- Keep Helm/OLM up to date: Ensure your tooling is current
- Document your process: Keep notes on customizations and configurations
Next Steps
- Troubleshooting Guide - Diagnose upgrade issues
- PowerMonitor Configuration - Review configuration options for new versions