Configuration
Set up AutoLifecycle on your EKS cluster with castctl, switch add-ons to Managed, and configure automatic upgrades.
Early Access FeatureThis feature is in early access. It may undergo changes based on user feedback and continued development. We recommend testing in non-production environments first and welcome your feedback to help us improve.
This guide covers setting up AutoLifecycle on an Amazon EKS cluster: creating the IAM role the EKS controller runs with, switching add-ons from Observe to Managed, and configuring the automatic upgrade policy.
Before you start
- An Amazon EKS cluster connected to Cast AI (see Connect using the castctl CLI).
castctlinstalled and logged in (castctl auth login).- AWS permissions to create IAM roles and Pod Identity associations (handled by the
castctlcommand below).
Step 1: Create the IAM role with castctl
castctlThe Operator never manages IAM. castctl creates the role the EKS controller runs with; the command is idempotent: running it twice changes nothing the second time.
EKS controller role
castctl cluster eks-iam --cluster-name <cluster-name> --region <region> \
--manage-load-balancer-controller --manage-addon-roles
castctl cluster addons enable --cluster-name <cluster-name> --region <region>eks-iam creates the EKS controller's IAM role and its Pod Identity association. With --manage-load-balancer-controller it also creates the AWS Load Balancer Controller's role, and with --manage-addon-roles a role for the VPC CNI and EBS CSI driver add-ons that have none. The policy includes iam:SimulatePrincipalPolicy, which powers the Load Balancer Controller's IAM pre-check. addons enable then turns on the Operator's EKS controller in Observe mode, so it discovers the cluster's add-ons.
Karpenter roles (optional)
Karpenter is handled like any other add-on: you opt in to managing it. If you do, it needs AWS roles of its own: this command creates them.
castctl cluster karpenter-aws --cluster-name <cluster-name> --region <region> --tag-discovery-resourcesCreates what upstream Karpenter's getting-started CloudFormation creates: the node role, the controller policies, and the interruption queue and its rules, and adds the controller's Pod Identity association.
| Flag | Description |
|---|---|
--update-drifted | Bring an existing role up to date before a Karpenter minor upgrade. |
--default-nodepool | Create a default NodePool and EC2NodeClass (AL2023, al2023@latest) when they are absent. |
Preflight checksThe
karpenter-awscommand refuses to run where another Karpenter is already installed, and flags a foreigncapacitybuffersCRD or a running cluster-autoscaler before creating anything.
For the complete flag list, see the castctl command reference.
Step 2: Review your add-ons (Observe mode)
After onboarding, the Cast AI console lists the add-ons on the AutoLifecycle page, in Observe mode, with auto-update disabled. Each row shows the installed version, the latest compatible version for the current and next Kubernetes minor, health, and whether the add-on would block the next Kubernetes upgrade.
AutoLifecycle makes no changes in Observe mode: it is a report of what is installed and what is available.
Step 3: Switch an add-on to Managed
Switch a component to Managed to let AutoLifecycle change its version:
-
In the console: select the add-on, set the mode to
Managed, and pick a target version. The console shows the pending action until the in-cluster controller acknowledges it.
-
Declaratively: set the same fields on the
ManagedAddonresource. The console and a manual spec change follow exactly the same path.
Only Managed components are ever modified. GitOps-owned, customer-owned, and hands-off components stay read-only. See Ownership rules.
Automatic upgrades
Turning Auto update on for a component (Managed) lets Cast AI upgrade it to the latest compatible version on its own, inside your update window, or as soon as one is available when you set no window. Turning it off (Observe) stops all changes.
| Setting | Behavior |
|---|---|
| Auto update off (Observe) | No changes; Cast AI only reports versions and blockers |
| Auto update on (Managed) | Moves to the latest compatible version, including new minors |
spec.upgradePolicy.mode: Patch (kubectl or GitOps only) | Only applies patch releases within the current minor |
Policy behavior:
- The controller moves
spec.versionto the reported latest compatible version itself. Versions on the curated skip list are never chosen. - There is no soak period for EKS add-ons yet: a newly compatible version can be applied at the next reconcile. The maintenance window and the kill switch are the brakes.
- A
RolledBackorFailedautomatic attempt pauses the policy for that add-on. Select another version of the add-on, or incrementspec.retryon itsManagedAddon, to resume the policy. - GitOps-owned and hands-off components are never auto-upgraded.
Maintenance window
Optionally restrict when automatic upgrades may start, for example Sunday 02:00 to 04:00. The window is set once for the cluster (spec.maintenanceWindow on the ClusterUpgradePolicy) and applies to the control plane and to Managed add-ons; an add-on's own spec.upgradePolicy.maintenanceWindow overrides it. Upgrades already running when the window closes are left to finish.
Kill switch
Automatic upgrades can be stopped at two layers:
- In the cluster (decisive): a chart value / environment variable on the EKS controller. Works without a connection to Cast AI.
- From Cast AI (optional): a single switch in the console that can only turn automatic upgrades off. The controller keeps the last value it received, so it stays in force while disconnected; a cluster that never received it follows the in-cluster setting.
Turning the switch off stops new automatic upgrades. Attempts already running are left alone, and manual upgrades keep working.
CoreDNS autoscaling
CoreDNS runs two replicas by default regardless of cluster size, which can cause DNS timeouts in large clusters. spec.eksAddon.coreDNS.scaling defaults to CAST, so switching CoreDNS to Managed is what turns on the EKS autoScaling object. The controller sets minReplicas to the current replica count, with a minimum of 2, and saves the previous autoScaling value in status.coreDNSScaling. The change runs through the same gated flow and validates with the DNSResolves gate.
When the customer already scales CoreDNS
AutoLifecycle does not fight another autoscaler:
autoScalingset inspec.configurationValues: left alone, never overwritten.replicaCountset inspec.configurationValues: no takeover, because EKS autoscaling would override it.- EKS
autoScalingalready enabled, or an HPA, KEDA, or cluster-proportional-autoscaler on CoreDNS: no takeover. If one of those autoscalers appears later, CAST restores the saved configuration. replicaCountset directly on the EKS add-on but not in the spec: does not block the takeover, so autoscaling then controls the replica count.
Opting out
Set spec.eksAddon.coreDNS.scaling to Customer to opt out. This restores the saved autoScaling value, or removes it when there was none. Switching back to Observe does not undo the takeover, because Observe changes nothing.
The CoreDNSScaling condition on the coredns add-on says whether Cast AI scales CoreDNS and, when it doesn't, why. The console reports whether autoscaling is on and how replicas compare to node count.
Next steps
Updated 13 hours ago
