/create-hc-aws
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
$ npx -y skills add openshift/hypershift --skill create-hc-aws --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/create-hc-aws
Context preview
The summary Claude sees to decide when to auto-load this skill.
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
SKILL.md
create-hc-aws.SKILL.mdname: Create HC AWS
description: "Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images."
Create HostedCluster
This skill creates a HyperShift HostedCluster on AWS for development and testing purposes. The clusters created are intended for local development workflows, not for production use.
When to Use This Skill
Use this skill when:
- You need to create a dev/test HostedCluster for manual verification
- You want to test HyperShift features against a live cluster
- You need a HostedCluster with custom CPO or HO images
- You are iterating on code changes and need a cluster to validate them
Prerequisites
Source the environment file before using this skill:
source dev/claude-env.sh
Additional requirements:
- AWS credentials loaded (source `$AWS_CREDS_SOURCE`)
- KUBECONFIG pointing to management cluster (`$MGMT_KUBECONFIG`)
- hypershift binary built (`./bin/hypershift` or run `make hypershift`)
- Pull secret available (`$PULL_SECRET`)
Environment Configuration
Environment variables from `dev/claude-env.sh`:
| Variable | Description | |----------|-------------| | `AWS_CREDENTIALS` | Path to AWS credentials file | | `AWS_CREDS_SOURCE` | Script to source AWS env vars | | `BASE_DOMAIN` | Base DNS domain for clusters | | `PULL_SECRET` | Path to pull secret file | | `AWS_REGION` | AWS region | | `MGMT_KUBECONFIG` | Path to management cluster kubeconfig | | `CPO_IMAGE_REPO` | Custom CPO image repository |
Basic Command
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift create cluster aws \
--name <CLUSTER_NAME> \
--namespace clusters \
--base-domain $BASE_DOMAIN \
--aws-creds $AWS_CREDENTIALS \
--pull-secret $PULL_SECRET \
--region $AWS_REGION \
--release-image quay.io/openshift-release-dev/ocp-release:4.21.0-multi \
--node-pool-replicas 2
Common Parameters
| Parameter | Description | Default | |-----------|-------------|---------| | `--name` | Name of the HostedCluster | Required | | `--namespace` | Namespace for the HostedCluster | `clusters` | | `--base-domain` | Base DNS domain | `$BASE_DOMAIN` | | `--aws-creds` | Path to AWS credentials file | `$AWS_CREDENTIALS` | | `--pull-secret` | Path to pull secret file | `$PULL_SECRET` | | `--region` | AWS region | `$AWS_REGION` | | `--release-image` | OCP release image | Latest 4.21.0 multi-arch | | `--node-pool-replicas` | Initial node count | `0` (add nodes later) | | `--control-plane-operator-image` | Custom CPO image | Optional |
With Custom CPO Image
When testing CPO changes, add the custom image:
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift create cluster aws \
--name my-test-cluster \
--namespace clusters \
--base-domain $BASE_DOMAIN \
--aws-creds $AWS_CREDENTIALS \
--pull-secret $PULL_SECRET \
--region $AWS_REGION \
--release-image quay.io/openshift-release-dev/ocp-release:4.21.0-multi \
--node-pool-replicas 2 \
--control-plane-operator-image $CPO_IMAGE_REPO:YOUR_TAG
What Gets Created
The command creates:
- AWS VPC with public and private subnets
- NAT gateway and internet gateway
- Route tables
- Private hosted zones (Route53)
- OIDC provider for STS
- IAM roles for control plane components
- Worker instance profile
- HostedCluster and NodePool resources
Post-Creation Steps
1. **Check HostedCluster status:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl get hostedcluster -n clusters
2. **Wait for control plane to be available:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl wait --for=condition=Available \
hostedcluster/<CLUSTER_NAME> -n clusters --timeout=10m3. **Scale NodePool to add nodes:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl scale nodepool <NODEPOOL_NAME> \
-n clusters --replicas=14. **Get guest cluster kubeconfig:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl get secret <CLUSTER_NAME>-admin-kubeconfig \
-n clusters -o jsonpath='{.data.kubeconfig}' | base64 -d > /tmp/guest-kubeconfig.yamlCleanup
Use the `dev:destroy-hc-aws` skill or run:
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift destroy cluster aws \
--name <CLUSTER_NAME> \
--namespace clusters \
--aws-creds $AWS_CREDENTIALS \
--region $AWS_REGION
Troubleshooting
Cluster Creation Fails
- Check AWS credentials are valid
- Verify base domain exists in Route53
- Ensure OIDC S3 bucket is accessible
Control Plane Not Available
- Check HCP pods: `kubectl get pods -n clusters-<CLUSTER_NAME>`
- Check HCP conditions: `kubectl get hcp -n clusters-<CLUSTER_NAME> -o yaml`
Nodes Not Joining
- Check machines: `kubectl get machines -n clusters-<CLUSTER_NAME>`
- Check NodePool conditions: `kubectl get nodepool -n clusters -o yaml`
Read more
name: Create HC AWS description: "Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images."
Create HostedCluster
This skill creates a HyperShift HostedCluster on AWS for development and testing purposes. The clusters created are intended for local development workflows, not for production use.
When to Use This Skill
Use this skill when:
- You need to create a dev/test HostedCluster for manual verification
- You want to test HyperShift features against a live cluster
- You need a HostedCluster with custom CPO or HO images
- You are iterating on code changes and need a cluster to validate them
Prerequisites
Source the environment file before using this skill:
source dev/claude-env.sh
Additional requirements:
- AWS credentials loaded (source `$AWS_CREDS_SOURCE`)
- KUBECONFIG pointing to management cluster (`$MGMT_KUBECONFIG`)
- hypershift binary built (`./bin/hypershift` or run `make hypershift`)
- Pull secret available (`$PULL_SECRET`)
Environment Configuration
Environment variables from `dev/claude-env.sh`:
| Variable | Description | |----------|-------------| | `AWS_CREDENTIALS` | Path to AWS credentials file | | `AWS_CREDS_SOURCE` | Script to source AWS env vars | | `BASE_DOMAIN` | Base DNS domain for clusters | | `PULL_SECRET` | Path to pull secret file | | `AWS_REGION` | AWS region | | `MGMT_KUBECONFIG` | Path to management cluster kubeconfig | | `CPO_IMAGE_REPO` | Custom CPO image repository |
Basic Command
source $AWS_CREDS_SOURCE && \ KUBECONFIG=$MGMT_KUBECONFIG \ ./bin/hypershift create cluster aws \ --name <CLUSTER_NAME> \ --namespace clusters \ --base-domain $BASE_DOMAIN \ --aws-creds $AWS_CREDENTIALS \ --pull-secret $PULL_SECRET \ --region $AWS_REGION \ --release-image quay.io/openshift-release-dev/ocp-release:4.21.0-multi \ --node-pool-replicas 2
Common Parameters
| Parameter | Description | Default | |-----------|-------------|---------| | `--name` | Name of the HostedCluster | Required | | `--namespace` | Namespace for the HostedCluster | `clusters` | | `--base-domain` | Base DNS domain | `$BASE_DOMAIN` | | `--aws-creds` | Path to AWS credentials file | `$AWS_CREDENTIALS` | | `--pull-secret` | Path to pull secret file | `$PULL_SECRET` | | `--region` | AWS region | `$AWS_REGION` | | `--release-image` | OCP release image | Latest 4.21.0 multi-arch | | `--node-pool-replicas` | Initial node count | `0` (add nodes later) | | `--control-plane-operator-image` | Custom CPO image | Optional |
With Custom CPO Image
When testing CPO changes, add the custom image:
source $AWS_CREDS_SOURCE && \ KUBECONFIG=$MGMT_KUBECONFIG \ ./bin/hypershift create cluster aws \ --name my-test-cluster \ --namespace clusters \ --base-domain $BASE_DOMAIN \ --aws-creds $AWS_CREDENTIALS \ --pull-secret $PULL_SECRET \ --region $AWS_REGION \ --release-image quay.io/openshift-release-dev/ocp-release:4.21.0-multi \ --node-pool-replicas 2 \ --control-plane-operator-image $CPO_IMAGE_REPO:YOUR_TAG
What Gets Created
The command creates:
- AWS VPC with public and private subnets
- NAT gateway and internet gateway
- Route tables
- Private hosted zones (Route53)
- OIDC provider for STS
- IAM roles for control plane components
- Worker instance profile
- HostedCluster and NodePool resources
Post-Creation Steps
1. **Check HostedCluster status:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl get hostedcluster -n clusters
2. **Wait for control plane to be available:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl wait --for=condition=Available \
hostedcluster/<CLUSTER_NAME> -n clusters --timeout=10m3. **Scale NodePool to add nodes:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl scale nodepool <NODEPOOL_NAME> \
-n clusters --replicas=14. **Get guest cluster kubeconfig:**
KUBECONFIG=$MGMT_KUBECONFIG kubectl get secret <CLUSTER_NAME>-admin-kubeconfig \
-n clusters -o jsonpath='{.data.kubeconfig}' | base64 -d > /tmp/guest-kubeconfig.yamlCleanup
Use the `dev:destroy-hc-aws` skill or run:
source $AWS_CREDS_SOURCE && \ KUBECONFIG=$MGMT_KUBECONFIG \ ./bin/hypershift destroy cluster aws \ --name <CLUSTER_NAME> \ --namespace clusters \ --aws-creds $AWS_CREDENTIALS \ --region $AWS_REGION
Troubleshooting
Cluster Creation Fails
- Check AWS credentials are valid
- Verify base domain exists in Route53
- Ensure OIDC S3 bucket is accessible
Control Plane Not Available
- Check HCP pods: `kubectl get pods -n clusters-<CLUSTER_NAME>`
- Check HCP conditions: `kubectl get hcp -n clusters-<CLUSTER_NAME> -o yaml`
Nodes Not Joining
- Check machines: `kubectl get machines -n clusters-<CLUSTER_NAME>`
- Check NodePool conditions: `kubectl get nodepool -n clusters -o yaml`
HyperShift is a middleware for hosting OpenShift control planes at scale that solves for cost and time to provision, as well as portability cross cloud with strong separation of concerns between management and workloads.
Repo: openshift/hypershift
Other skills on hypershift.
- /create-cpo-override
Interactively create CPO image overrides — resolves images, verifies fixes, edits overrides.yaml, and prepares a PR
Open skill - /debug-cluster
Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or troubleshooting control plane issues.
Open skill - /build-cpo-image
Build and push control-plane-operator container image. Auto-applies when testing CPO changes that require deploying to a live cluster.
Open skill - /build-ho-image
Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.
Open skill - /destroy-hc-aws
Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
Open skill - /e2e-run-aws
Provides the ability to run and iterate on HyperShift e2e tests. Auto-applies when implementing features that require e2e validation, fixing e2e test failures, or working on tasks that need live cluster testing.
Open skill

