Configuration

Set up AutoLifecycle on your EKS cluster with castctl, switch add-ons to Managed, and configure automatic upgrades.

📣

Early Access Feature

This 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).
  • castctl installed and logged in (castctl auth login).
  • AWS permissions to create IAM roles and Pod Identity associations (handled by the castctl command below).

Step 1: Create the IAM role with castctl

The 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-resources

Creates 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.

FlagDescription
--update-driftedBring an existing role up to date before a Karpenter minor upgrade.
--default-nodepoolCreate a default NodePool and EC2NodeClass (AL2023, al2023@latest) when they are absent.
📘

Preflight checks

The karpenter-aws command refuses to run where another Karpenter is already installed, and flags a foreign capacitybuffers CRD 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.

Add-ons list showing each add-on's installed and latest version, whether it blocks the next control plane, auto-update state, and the next scheduled 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.

    Add-on details for CoreDNS with Change version, the auto-update toggle, and the version history

  • Declaratively: set the same fields on the ManagedAddon resource. 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.

SettingBehavior
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.version to 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 RolledBack or Failed automatic attempt pauses the policy for that add-on. Select another version of the add-on, or increment spec.retry on its ManagedAddon, 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:

  • autoScaling set in spec.configurationValues: left alone, never overwritten.
  • replicaCount set in spec.configurationValues: no takeover, because EKS autoscaling would override it.
  • EKS autoScaling already 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.
  • replicaCount set 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


Did this page help you?