destroy-hc-aws
БесплатноБез исполняемых скриптовНе проверенDestroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
от openshift★ 556 звёзд на GitHubОб этом скилле
Destroy HostedCluster
This skill destroys a HyperShift HostedCluster and all associated AWS infrastructure.
When to Use This Skill
Use this skill when:
- You need to clean up a test HostedCluster
- You want to destroy a HostedCluster and its AWS resources (VPC, subnets, NAT gateways, IAM roles, etc.)
- You need to remove orphaned HostedClusters from previous test runs
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)
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 |
AWS_REGION |
AWS region |
MGMT_KUBECONFIG |
Path to management cluster kubeconfig |
Command
source $AWS_CREDS_SOURCE && \
KUBECONFIG=$MGMT_KUBECONFIG \
./bin/hypershift destroy cluster aws \
--name <CLUSTER_NAME> \
--namespace <NAMESPACE> \
--aws-creds $AWS_CREDENTIALS \
--region $AWS_REGION
Parameters
| 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 |
What Gets Destroyed
The command destroys:
- HostedCluster and NodePool resources
- HostedControlPlane namespace and all resources
- AWS VPC and subnets
- NAT gateways and internet gateways
- Route tables
- Security groups
- DHCP options
- Private hosted zones (Route53)
- OIDC provider
- IAM roles and instance profiles
- VPC endpoints
- Elastic IPs
Quick Cleanup for Orphaned HCs
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-
Example Usage
# 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
Troubleshooting
NAT Gateway Still Deleting
NAT gateways take time to delete. The command will retry automatically.
VPC Has Dependencies
The command will retry until all dependencies (subnets, gateways, etc.) are deleted.
HostedCluster Stuck in Deleting
- Check if there are stuck finalizers
- Remove the cleanup-cloud-resources annotation if you want to skip AWS cleanup
- Manually delete AWS resources if needed
Установить destroy-hc-aws в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл destroy-hc-aws?
Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).
Как установить скилл destroy-hc-aws?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл destroy-hc-aws запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic