ワンクリックで
destroy-hc-aws
// Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
// Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
Accesses archived Konflux PipelineRuns, TaskRuns, and pod logs via KubeArchive. Auto-applies when checking Konflux PipelineRun results, investigating enterprise contract failures, or retrieving logs from completed Konflux CI runs.
Build and push control-plane-operator container image. Auto-applies when testing CPO changes that require deploying to a live cluster.
Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
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.
Create development environments with git worktrees, branches, commits, and push to remote. Auto-applies for git workflow tasks.
| name | Destroy HC AWS |
| description | Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.). |
This skill destroys a HyperShift HostedCluster and all associated AWS infrastructure.
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)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 |
AWS_REGION | AWS region |
MGMT_KUBECONFIG | Path to management cluster kubeconfig |
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift destroy cluster aws \
--name <CLUSTER_NAME> \
--namespace <NAMESPACE> \
--aws-creds $AWS_CREDENTIALS \
--region $AWS_REGION
| Parameter | Description | Default |
|---|---|---|
--name | Name of the HostedCluster to destroy | Required |
--namespace | Namespace where the HostedCluster exists | clusters |
--aws-creds | Path to AWS credentials file | $AWS_CREDENTIALS |
--region | AWS region | $AWS_REGION |
The command destroys:
If a HostedCluster is stuck deleting, you can force remove it:
# Remove cleanup annotation to skip cloud resource cleanup
KUBECONFIG=$MGMT_KUBECONFIG kubectl annotate hostedcluster <NAME> -n <NAMESPACE> \
hypershift.openshift.io/cleanup-cloud-resources-
# List existing HostedClusters
KUBECONFIG=$MGMT_KUBECONFIG kubectl get hostedclusters -A
# Destroy a specific HostedCluster
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift destroy cluster aws \
--name my-test-cluster \
--namespace clusters \
--aws-creds $AWS_CREDENTIALS \
--region $AWS_REGION
NAT gateways take time to delete. The command will retry automatically.
The command will retry until all dependencies (subnets, gateways, etc.) are deleted.