agentleFS
rossoctlrossoctl/agent-skills/skills/hypershift-cluster/SKILL.md

hypershift-cluster

Skill1 starsChanged 4 months agoApache-2.0View on GitHub

Create and destroy ephemeral HyperShift (hosted OpenShift) clusters on AWS. Owns the shared HyperShift scripts and lib that the other HyperShift skills reference. Use when you need to create a test OpenShift cluster, destroy one after testing, or look up cluster naming, environment variables, or the post-create deploy/e2e workflow.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create, destroy, and manage HyperShift clusters on AWS for testing.

    line 15
  2. Very specific:

    Before creating clusters, ensure setup is complete (see the hypershift-setup skill for detail):

    line 31
  3. Distinctive:

    hypershift-preflight: Run pre-flight checks

    line 193
  4. Distinctive:

    hypershift-quotas: Check AWS quotas and plan parallel capacity

    line 194

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

HyperShift Cluster Management Skill

Create, destroy, and manage HyperShift clusters on AWS for testing.

This skill owns the shared scripts. Every HyperShift script and the shared hypershift-lib.sh live under scripts/ here; the other HyperShift skills point at them via ../hypershift-cluster/scripts/.... Run any script with no arguments (or --help where supported) to see its options first.

When to Use

  • Need to create a test OpenShift cluster on AWS
  • Destroying a cluster after testing
  • User asks "create hypershift cluster" or "destroy cluster"
  • Testing on real OpenShift (not Kind)

Prerequisites

Before creating clusters, ensure setup is complete (see the hypershift-setup skill for detail):

# 1. Run preflight check
scripts/preflight-check.sh

# 2. Setup credentials (first time only, requires IAM admin)
scripts/setup-hypershift-ci-credentials.sh

# 3. Setup local tools (hcp CLI, ansible, etc.)
scripts/local-setup.sh

The scripts locate your credentials file relative to your current working directory (or via $HYPERSHIFT_ENV_FILE) and the hypershift-automation clone via $HYPERSHIFT_AUTOMATION_DIR (falling back to a sibling of your cwd or $HOME/hypershift-automation). They do not assume any particular repository layout.

Create Cluster

Quick Create (Default Suffix)

# Creates: rossoctl-hypershift-custom-<username>
scripts/create-cluster.sh

Create with Custom Suffix

# Creates: rossoctl-hypershift-custom-pr529
scripts/create-cluster.sh pr529

# Creates: rossoctl-hypershift-custom-mytest
scripts/create-cluster.sh mytest

Create with Custom Configuration

# More worker nodes and larger instances
REPLICAS=3 INSTANCE_TYPE=m5.2xlarge scripts/create-cluster.sh

# Specific OCP version
OCP_VERSION=4.19.5 scripts/create-cluster.sh

Environment Variables

VariableDefaultDescription
REPLICAS2Number of worker nodes
INSTANCE_TYPEm5.xlargeAWS instance type
OCP_VERSION4.20.11OpenShift version
CLUSTER_SUFFIXusernameSuffix for cluster name
MANAGED_BY_TAGrossoctl-hypershift-customIAM scope prefix

Destroy Cluster

Quick Destroy

# Destroy by suffix
scripts/destroy-cluster.sh <suffix>

# Examples:
scripts/destroy-cluster.sh pr529
scripts/destroy-cluster.sh ladas

Destroy by Full Name

scripts/destroy-cluster.sh rossoctl-hypershift-custom-pr529

After Cluster Creation

The create script outputs next steps. A typical workflow deploys the platform onto the new cluster. These deploy/e2e steps run from a rossoctl checkout (they are not bundled with this skill):

# 1. Set kubeconfig to new cluster
export KUBECONFIG=~/clusters/hcp/<cluster-name>/auth/kubeconfig

# 2. Verify cluster access
oc get nodes
oc get clusterversion

# 3. Deploy the platform (from a rossoctl checkout)
./.github/scripts/operator/30-run-installer.sh --env ocp
./.github/scripts/operator/41-wait-crds.sh

# 4. Deploy demo agents
./.github/scripts/operator/71-build-weather-tool.sh
./.github/scripts/operator/72-deploy-weather-tool.sh
./.github/scripts/operator/74-deploy-weather-agent.sh

# 5. Run E2E tests
export AGENT_URL="https://$(oc get route -n team1 weather-service -o jsonpath='{.spec.host}')"
export ROSSOCTL_CONFIG_FILE=deployments/envs/ocp_values.yaml
./.github/scripts/operator/90-run-e2e-tests.sh

Cluster Naming

Clusters are named: ${MANAGED_BY_TAG}-${CLUSTER_SUFFIX}

MANAGED_BY_TAGUse CaseExample
rossoctl-hypershift-customLocal development (default)rossoctl-hypershift-custom-ladas
rossoctl-hypershift-ciCI/CD pipelinesrossoctl-hypershift-ci-pr529

The cluster suffix is limited to 5 characters (AWS IAM role-name length limit).

Troubleshooting

Cluster Creation Stuck

# Check HostedCluster status (use management cluster kubeconfig)
source .env.rossoctl-hypershift-custom  # or .env.hypershift-ci
oc get hostedcluster -n clusters

# Check conditions
oc get hostedcluster -n clusters <cluster-name> -o jsonpath='{range .status.conditions[*]}{.type}{": "}{.status}{" - "}{.message}{"\n"}{end}'

# Check NodePool
oc get nodepool -n clusters <cluster-name>

Cluster Deletion Stuck

# Debug AWS resources (see the hypershift-debug skill)
scripts/debug-aws-hypershift.sh <cluster-name>

# Force remove finalizer (only if AWS resources are cleaned)
oc patch hostedcluster -n clusters <cluster-name> -p '{"metadata":{"finalizers":null}}' --type=merge

Control Plane Namespace Issues

# If namespace is stuck terminating
oc delete ns clusters-<cluster-name> --wait=false
oc patch ns clusters-<cluster-name> -p '{"metadata":{"finalizers":null}}' --type=merge

Check AWS Quotas

# Before creating clusters, check capacity (see the hypershift-quotas skill)
scripts/check-quotas.sh

Related Skills

  • hypershift-setup: Set up the local environment for HyperShift
  • hypershift-preflight: Run pre-flight checks
  • hypershift-quotas: Check AWS quotas and plan parallel capacity
  • hypershift-debug: Debug AWS resources for stuck clusters
  • hypershift-cleanup: TTL/label-based auto-cleanup of stale clusters

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.