---
name: castai-upgrade-migration
description: 'Upgrade the CAST AI umbrella chart or migrate standalone releases with preserved values, explicit downtime, staged verification, and recovery evidence. Use when performing component updates, GitOps adoption, or consolidation with castctl. Trigger with: "upgrade CAST AI", "migrate CAST AI Helm releases", "move CAST AI to the umbrella chart".'
allowed-tools: Read, Grep, Write, Edit, Bash(helm:*), Bash(kubectl:*), Bash(castctl:*), Bash(terraform:*)
version: 2.0.0
argument-hint: '[cluster-and-target-release]'
model: inherit
effort: high
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
  - saas
  - kubernetes
  - cast-ai
  - upgrades
  - migration
compatibility: 'Umbrella-chart upgrades using reset-then-reuse-values require Helm 3.14 or newer; standalone migration requires current castctl support'
title: castai-upgrade-migration
canonical_url: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/castai-upgrade-migration
last_updated: 2026-10-07T06:06:28.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/official-docs.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/castai-upgrade-migration/references/official-docs.md).
>
> If the user asked to install this Skill, run `npx skilld install jeremylongshore/tons-of-skills-marketplace/castai-upgrade-migration`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/castai-upgrade-migration`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/jeremylongshore/tons-of-skills-marketplace/castai-upgrade-migration) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/castai-upgrade-migration`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/castai-upgrade-migration --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/castai-upgrade-migration --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# CAST AI Upgrade and Umbrella Migration

## Overview

Inventory the installed topology, pin the target, preserve values, and rehearse recovery before changing a cluster. Treat standalone-to-umbrella consolidation as a downtime-bearing migration, not an ordinary chart bump.

## Prerequisites

- Exact kube context, installation owner, current releases, chart/provider locks, and target
- Maintenance window, workload and platform owners, rollback threshold, and evidence path
- Current backups of declared values and infrastructure state references without secret material

## Instructions

### Step 1: Classify the installation

Use Bash(helm:\*) to determine whether the namespace has one `castai` umbrella release or multiple standalone releases. Use Read and Grep to map Terraform, GitOps, console, and castctl ownership. Do not proceed while authorities conflict.

### Step 2: Capture the baseline

Use Bash(kubectl:\*) for component images, readiness, recent warning events, policy-visible workload health, PDBs, HPAs, and pending pods. Record selected umbrella mode and optional component overrides.

### Step 3: Review target and render

Pin the target chart or provider from current release metadata. Use Bash(helm:_) to render the proposed umbrella values and Bash(terraform:_) to save a reviewed plan when Terraform owns delivery. Inspect CRDs, RBAC, webhooks, component modes, removed values, and automation changes.

### Step 4: Choose upgrade or migration

For an existing umbrella release, use the documented chart upgrade with `--reset-then-reuse-values`; Helm 3.14 or newer is required. Pin the current chart version when changing configuration without changing components. For standalone releases, use Bash(castctl:\*) with `cluster migrate`; expect a window where components and both autoscalers are paused.

### Step 5: Protect recovery

Before standalone migration, set and protect the values-dump destination. If umbrella installation fails, preserve the generated values and debug snapshot, correct the conflict, then use documented values-file recovery. Do not publish dumps; they can contain sensitive configuration.

### Step 6: Verify and promote

Confirm one intended release, component readiness, cluster identity, telemetry, policy state, automation mode, HPAs, PDBs, and node/workload behavior. Compare the baseline and hold promotion on any unexplained drift.

## Tool Discipline

Use Read and Grep for release and ownership evidence. Use Write and Edit for the plan and recovery record. Use Bash(helm:_), Bash(terraform:_), Bash(kubectl:_), and Bash(castctl:_) only inside the approved render, migration, upgrade, and verification boundaries.

## Output

- Current-versus-target topology and artifact pins
- Reviewed upgrade or migration plan
- Preserved values and recovery procedure
- Post-change parity and health receipt

## Examples

A legacy cluster migrates four standalone releases with castctl during a maintenance window and verifies one umbrella release afterward. A GitOps cluster pins its current chart while changing values, avoiding an accidental component upgrade.

## Error Handling

| Failure                         | Response                                                                      |
| ------------------------------- | ----------------------------------------------------------------------------- |
| Helm is older than 3.14         | Upgrade the client before using reset-then-reuse-values                       |
| Migration dump contains secrets | Restrict it immediately and sanitize only a copy for review                   |
| Umbrella install fails          | Preserve generated recovery artifacts and use documented values-file recovery |
| Post-change automation differs  | Hold promotion and restore the reviewed mode                                  |

## Resources

- [Migration evidence and source notes](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/castai-upgrade-migration/references/official-docs.md)
- [Hosted components](https://docs.cast.ai/docs/hosted-components)
- [Connect with castctl](https://docs.cast.ai/docs/connect-with-castctl)
- [Workload Autoscaler configuration](https://docs.cast.ai/docs/workload-autoscaling-configuration)
