sandbox-cli/skills/cluster-onboard/SKILL.md
This skill should be used when the user asks to "onboard a cluster", "add a cluster to sandbox", "register a cluster", "onboard OCP cluster", "sandbox onboard", or "add a new shared cluster".
npx skillsauth add rhpds/rhdp-skills-marketplace sandbox-cli:cluster-onboardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Name: Sandbox Cluster Onboard Description: Onboard a new OCP shared cluster to the RHDP Sandbox API.
Walk the user through onboarding a new OpenShift cluster to the Sandbox API. This includes verifying prerequisites, checking VPN, logging in to the target cluster, creating the onboard config, running the onboard command, and verifying the result.
Check that sandbox-cli is installed:
which sandbox-cli
If sandbox-cli is not installed, tell the user to run /sandbox-cli:sandbox-setup first and stop.
CRITICAL: Always verify VPN connectivity before any sandbox-cli operation.
host squid.redhat.com
If the DNS resolves (returns an IP address like 10.x.x.x), the user is on VPN. Proceed.
If it fails with NXDOMAIN, not found, or connection timed out, STOP and tell the user:
You are NOT connected to the Red Hat VPN. The sandbox API is IP-restricted and all commands will fail with EOF errors. Please connect to the Red Hat VPN before proceeding.
Do NOT proceed until VPN is confirmed.
sandbox-cli status
If not authenticated or token expired, tell the user to re-login:
sandbox-cli login --server <SERVER_URL> --token <TOKEN>
Ask the user for:
https://api.cluster-xxxxx.dynamic.redhatworkshops.io:6443oc login token or kubeconfig for the new clustercluster-config.json or cluster-config-cnv.json)cloud annotation (e.g., cnv-dedicated-shared, aws-shared)purpose annotation (e.g., dev, events, prod)lab annotation (e.g., lb1401-sec-genai-guardrails-service)virt, keycloak, etc.)skip_quota (true/false, default false)max_placements (0 = unlimited)The user must be logged into the target OCP cluster as admin:
oc login --token=<ADMIN_TOKEN> --server=<CLUSTER_API_URL>
If certificate warning appears, the user may need to accept insecure connections.
Verify login:
oc whoami
oc cluster-info
If the user doesn't have a config file, create one. Example for CNV dedicated:
{
"annotations": {
"cloud": "cnv-dedicated-shared",
"purpose": "dev",
"lab": "<lab-annotation>"
},
"deployer_admin_sa_token_ttl": "48h",
"deployer_admin_sa_token_refresh_interval": "24h",
"deployer_admin_sa_token_target_var": "cluster_admin_agnosticd_sa_token",
"skip_quota": true
}
Example for general shared cluster with rate limiting:
{
"annotations": {
"cloud": "cnv-dedicated-shared",
"purpose": "events",
"virt": "yes"
},
"deployer_admin_sa_token_ttl": "1h",
"deployer_admin_sa_token_refresh_interval": "30m",
"deployer_admin_sa_token_target_var": "cluster_admin_agnosticd_sa_token",
"max_placements": 30,
"settings": {
"provision_rate_limit": 50,
"provision_rate_window": "10m"
}
}
Run the onboard command:
sandbox-cli cluster onboard <CLUSTER_NAME> --config <CONFIG_FILE>
The cluster name is optional -- if omitted, it's extracted from the API URL (e.g., cluster-tdsqt from https://api.cluster-tdsqt.dynamic.redhatworkshops.io:6443).
What this does automatically:
rhdp-serviceaccountssandbox-api-managercluster-admin to the service accountExpected output:
==> Checking cluster access...
API URL: https://api.cluster-xxxxx:6443
Ingress: apps.cluster-xxxxx.example.com
Name: cluster-xxxxx
==> Creating service account...
Creating namespace 'rhdp-serviceaccounts'...
Creating service account 'sandbox-api-manager'...
Granting cluster-admin to 'sandbox-api-manager'...
Creating long-lived token (~10 years)...
Token created successfully.
==> Registering cluster with sandbox API...
OCP shared cluster configuration created
==> Validating cluster health...
==> Cluster registered successfully.
sandbox-cli cluster get <CLUSTER_NAME>
Check that:
valid is trueannotations match the configapi_url and ingress_domain are correctdeployer_admin_sa_token_ttl and related fields are set (if configured)Run a dry-run to confirm the cluster matches expected selectors:
sandbox-cli placement dry-run --selector 'lab=<LAB>,purpose=<PURPOSE>'
Or test against an AgnosticV catalog file:
sandbox-cli placement dry-run -f <path-to-common.yaml>
Expected output:
Result: MATCH
Matching clusters: 1
- cluster-xxxxx
Wait ~10 seconds for the sandbox API to generate the deployer admin token, then:
sandbox-cli cluster get <CLUSTER_NAME>
Check data.deployer_admin_sa_token_updated_at is no longer 0001-01-01T00:00:00Z.
--dry-run flag can be used to preview the onboard payload without sending it--skip-validation flag skips the post-onboard health checkdeployer_admin_sa_token_* fields are REQUIRED if workloads need cluster-scoped access (e.g., creating namespaces, installing operators)tools
Writes validate.yml playbooks using the validation_check Ansible plugin. Takes the content-reader task report and solve-writer actions as input, producing checks that verify student progress without manual steps or navigation instructions.
tools
Writes solve.yml playbooks from the structured task report produced by ftl:content-reader. Uses the automation priority ladder (k8s_exec → k8s → uri → wait_for → Playwright) to generate Ansible tasks that replicate what the student does in the lab.
development
Pushes solve.yml and validate.yml to a live RHDP showroom, restarts the pod, and runs the full test cycle (fresh validate → solve → validate again → idempotency check). Reports pass/fail per task with full output for debugging.
tools
AsciiDoc reader agent for the FTL lab validator. Reads a showroom .adoc module file, extracts executable code blocks (role="execute"), classifies each step by automation type, and outputs a structured task report for the solve-writer and validate-writer agents.