Skip to main content
This guide walks through installing the chart and validating the current CRD-based automation flow.

Quick Links


Prerequisites

Before you begin, ensure you have:
  • Kubernetes 1.28+
  • Helm 3+
  • kubectl access to the target cluster
  • The kubex-crds chart installed in the target cluster before installing kubex-automation-engine
  • Kubex connection details from the Automation tab in the Kubex UI
  • A target workload that already has valid Kubex recommendations
Important:
  • Proactive rightsizing only works when a valid recommendation exists for the in-scope container
  • Recommendations are typically available about 24 hours after data collection starts

Step 1: Prepare Required Settings

Use the provided kubex-automation-values.yaml template as your starting point and update it with your environment-specific settings. At minimum, make sure these required fields are set:
If you already manage the Kubex credential secret externally, use this minimal configuration:
If this cluster is acting as a passive (DR) cluster, configure secondaryCluster so it follows recommendations from the active cluster.
Use this only for active/passive cluster pairs where both clusters run the same workloads with the same namespaces, workload names, workload types, and container names. If the passive cluster has different workloads or different naming, do not enable this mode. For more detail, see Secondary/DR Cluster Mode. Then create the referenced Secret in the same namespace as the Helm release using the exact keys username, epassword, url, and DENSIFY_BASE_URL. For the full Secret format, see External Credential Secret. If you are deploying on OpenShift, also set openshift.enabled: true in your values file to apply the chart’s restricted-friendly OpenShift defaults.

Step 2: Container Resource Sizing Guidance

Container resource requests and limits should be adjusted based on the number of managed containers in the cluster. Use these values as a starting point and tune them based on workload churn, recommendation volume, and webhook traffic.

Controller manager (resources)

Gateway sidecar (gateway.resources)

Sizing notes:
  • Small means up to 1,000 managed containers
  • Medium means 1,000 to 10,000 managed containers
  • Large means more than 10,000 managed containers
  • The chart currently exposes sizing controls for the controller manager and gateway sidecar; the older webhook and Valkey components do not apply to this chart
  • For slow API servers, webhook latency, restrictive admission environments, or placement resilience, continue with the Tuning Guide
Example values:

Step 3: Install the Helm Chart

Add the Kubex Helm repository on the machine where you run Helm:
Install the CRDs first:
Then install the kubex-automation-engine:
Note: If you are migrating from the previous Kubex Automation Controller that used Helm values to manage automation configuration, see Migrating from Helm-Managed Configuration. For new installations, proceed to Step 4.

Step 4: Verify Controller Health

Check the deployment:
Confirm:
  • The controller pod is running
  • spec.automationEnabled is true
  • Review the full status block, not just status.conditions
  • status.conditions[type=PodAdmissionWebhookHealthy].status is True
  • Any additional status fields that report controller readiness, webhook health, last sync, or reconciliation errors reflect the expected healthy state for your environment
If webhook health is not ready, automation stays paused until probe success reaches the configured threshold.

Step 5: Create Your First Strategy and Policy

Strategy and policy CRs should be managed separately from the Helm chart using kubectl, GitOps, or another external delivery workflow. This approach keeps the chart focused on installing and operating the controller while allowing strategy and policy configurations to evolve independently of chart upgrades. For a detailed explanation of GitOps ownership and why pod-level resizing does not create drift in the original workload manifest, see GitOps Integration. The main CR patterns are:
  • AutomationStrategy / ClusterAutomationStrategy: define how resizing is allowed to happen, including enablement rules, in-place resize behavior, eviction fallback, and safety checks.
  • ProactivePolicy / ClusterProactivePolicy: define where recommendation-driven automation applies and which strategy to reference.
  • StaticPolicy / ClusterStaticPolicy: define where fixed request/limit values should be enforced and which strategy to reference.
Choose the scope based on ownership boundaries:
  • Use namespaced CRs when a team should manage automation within its own namespace.
  • Use cluster-scoped CRs when a platform team needs one policy model across many namespaces.
Start with these guides, each with field references and fuller examples: A typical CR workflow looks like this:
  1. Install or upgrade the controller with Helm (as done in Step 3).
  2. Create one or more AutomationStrategy or ClusterAutomationStrategy objects for the resize behaviors you want.
  3. Create ProactivePolicy, ClusterProactivePolicy, StaticPolicy, or ClusterStaticPolicy objects that reference those strategies.
  4. Apply and reconcile those manifests through kubectl, GitOps, or another external workflow.
For a minimal start-to-finish example, use a cluster strategy that can resize requests and existing limits up or down, and a cluster proactive policy that targets a few namespaces:
Apply it with:
The strategy can set requests when none are specified, but it only resizes limits that already exist. Add or remove values in the policy selector to change which namespaces it affects. This pattern lets you tune strategy behavior and policy scope independently from Helm upgrades.

Step 6: Validate Recommendation Application

Check policy objects:
Validate admission annotations on a new pod:
Validate pod events:
Validate controller summary logs:
Look for results such as RESIZED, EVICTED, BLOCKED_RETRYING, or BLOCKED.

Apply Configuration Updates

Re-apply chart changes with:

Uninstall

Use this sequence when you want to remove the controller without leaving policy or strategy resources stuck in Terminating.

Remove externally managed CRs first

If you manage policies and strategies outside Helm, first request deletion of those CRs before uninstalling the chart so the running controller can process their cleanup logic. This matters most for ProactivePolicy and ClusterProactivePolicy resources. Deleting them while the controller is still running gives the controller a chance to remove Kubex annotations it previously placed on workloads.
Wait for those resources to disappear before uninstalling Helm release:

Manually remove finalizers from external CRs only if deletion is stuck

The chart’s pre-delete hook removes finalizers from Helm-managed custom resources created by this release so helm uninstall can complete while the controller is shutting down. CRs managed outside Helm are not part of that hook. Do not clear finalizers before attempting deletion, because that can bypass controller cleanup. Only if a policy or strategy CR stays in Terminating after the delete step above should you manually clear its finalizers, and you should do that before helm uninstall:
Recheck until no policy or strategy CRs remain:

Uninstall the Helm releases

After external CR cleanup is complete, remove the controller chart:
If you also want to remove the CRDs from the cluster, uninstall the CRD chart after all custom resources are gone:

Next Steps

  • Review Configuration Reference for Helm keys and generated CRs
  • Review Tuning Guide for slow-cluster tolerance, webhook fail-open expectations, and example values
  • Review Policy Configuration for strategy and scope design
  • Review Safety Controls for webhook health gating, pause controls, freshness checks, and execution-time safety filters
  • Review Rollback Policies to add health monitoring and automatic rollback for production deployments
  • Review Troubleshooting if rightsizing is selected but not applied
  • Use externally managed CRs for StaticPolicy and ClusterStaticPolicy until Helm-managed generation is added for those resource types