openshift/create hc aws
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
npx skills add https://github.com/openshift/hypershift --skill Create HC AWS
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.
Use this skill when:
Source the environment file before using this skill:
source dev/claude-env.sh
Additional requirements:
$AWS_CREDS_SOURCE)$MGMT_KUBECONFIG)./bin/hypershift or run make hypershift)$PULL_SECRET)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 |
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
| 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 |
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
The command creates:
KUBECONFIG=$MGMT_KUBECONFIG kubectl get hostedcluster -n clusters
KUBECONFIG=$MGMT_KUBECONFIG kubectl wait --for=condition=Available \
hostedcluster/<CLUSTER_NAME> -n clusters --timeout=10m
KUBECONFIG=$MGMT_KUBECONFIG kubectl scale nodepool <NODEPOOL_NAME> \
-n clusters --replicas=1
KUBECONFIG=$MGMT_KUBECONFIG kubectl get secret <CLUSTER_NAME>-admin-kubeconfig \
-n clusters -o jsonpath='{.data.kubeconfig}' | base64 -d > /tmp/guest-kubeconfig.yaml
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
kubectl get pods -n clusters-<CLUSTER_NAME>kubectl get hcp -n clusters-<CLUSTER_NAME> -o yamlkubectl get machines -n clusters-<CLUSTER_NAME>kubectl get nodepool -n clusters -o yamlTake openshift/create hc aws from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.