Skip to content
Development
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.

From plugin
hypershift
55122 skills5 agents

Claude Code

$ npx -y skills add openshift/hypershift --skill debug-cluster --agent claude-code

SKILL.md

debug-cluster.SKILL.md
name: Debug Cluster
description: "Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or troubleshooting control plane issues."

HyperShift Cluster Debugging Guide

This skill provides structured debugging workflows for common HyperShift hosted-cluster issues.

When to Use This Skill

This skill automatically applies when:

  • Investigating hosted-cluster deletion issues
  • Debugging stuck resources or finalizers
  • Troubleshooting control plane problems
  • Analyzing NodePool lifecycle issues
  • Reviewing operator logs for cluster problems

Provider-Specific Troubleshooting

For provider-specific issues and detailed troubleshooting steps, refer to these subskills:

  • **AWS**: [aws-troubleshooting.md](./aws-troubleshooting.md) - AWS-specific CAPI issues, infrastructure cleanup, and reinstallation

The main skill below provides provider-agnostic debugging workflows. When you encounter provider-specific issues, consult the relevant subskill for detailed resolution steps.

Key Components to Understand

Resource Hierarchy

  • **HostedCluster (HC)**: Main cluster resource in the management cluster
  • **HostedControlPlane (HCP)**: Control plane representation of the HC in HCP namespace
  • **NodePool (NP)**: Worker node pool resources
  • **CAPI Resources**: Cluster API resources (Cluster, Machine, etc.) in HCP namespace

Operators

  • **hypershift-operator (HO)**: Manages HC and NP resources
  • **control-plane-operator (CPO)**: Manages HCP and control plane components
  • **hosted-cluster-config-operator (HCCO)**: Manages configuration and in-cluster resources for hosted clusters

Namespaces

  • **HC namespace**: Where HostedCluster and NodePool resources live (e.g., `default`, `clusters`)
  • **HCP namespace**: Where control plane pods and CAPI resources run (e.g., `clusters-<cluster-name>`)

Common Debugging Scenarios

Scenario: Hosted Cluster Stuck Deleting

When a hosted-cluster is stuck in deleting state, follow this systematic debugging process:

1. Node Pools Deletion

Check and verify NodePool deletion is progressing:

# Check NodePool resources in HC namespace
kubectl get nodepool -n <hc-namespace>

# Check CAPI cluster resource status in HCP namespace
kubectl get cluster -n <hcp-namespace> -o yaml

# Check CAPI provider pod logs
kubectl logs -n <hcp-namespace> deployment/capi-provider

# Check CAPI machines status in HCP namespace
kubectl get machines -n <hcp-namespace>
kubectl describe machines -n <hcp-namespace>

# Review HyperShift operator logs for NodePool issues
kubectl logs -n hypershift deployment/operator --tail=100 | grep -i nodepool
kubectl logs -n hypershift deployment/operator --tail=100 | grep -i <cluster-name>

**What to look for:**

  • Finalizers blocking NodePool deletion
  • CAPI machines that aren't terminating
  • Provider errors preventing machine deletion
  • HO logs showing reconciliation errors

2. HostedControlPlane Resource Deletion

Verify HCP resource and pods are being cleaned up:

# Check HCP resource status
kubectl get hostedcontrolplane -n <hcp-namespace> -o yaml

# Check pods in HCP namespace
kubectl get pods -n <hcp-namespace>

# Check for stuck pods
kubectl get pods -n <hcp-namespace> --field-selector=status.phase!=Running

# Review control-plane-operator logs
kubectl logs -n <hcp-namespace> deployment/control-plane-operator --tail=100

**What to look for:**

  • HCP finalizers blocking deletion
  • Pods with finalizers or in Terminating state
  • CPO logs showing errors in resource cleanup
  • PVC or other resources preventing namespace deletion

3. HCP Namespace Deletion

Investigate why the HCP namespace isn't being removed:

# Check namespace status
kubectl get namespace <hcp-namespace> -o yaml

# List all remaining resources in namespace
kubectl api-resources --verbs=list --namespaced -o name | \
  xargs -n 1 kubectl get --show-kind --ignore-not-found -n <hcp-namespace>

# Check for resources with finalizers
kubectl get all -n <hcp-namespace> -o json | \
  jq '.items[] | select(.metadata.finalizers != null) | {kind: .kind, name: .metadata.name, finalizers: .metadata.finalizers}'

# Review HO logs for namespace cleanup
kubectl logs -n hypershift deployment/operator --tail=100 | grep -i namespace

**What to look for:**

  • Resources with finalizers preventing deletion
  • API resources that HO should have cleaned up
  • Webhook or admission controller errors
  • Namespace stuck in Terminating state

4. HostedCluster Resource Deletion

Final check on the HostedCluster resource itself:

# Check HostedCluster status
kubectl get hostedcluster -n <hc-namespace> <cluster-name> -o yaml

# Check HostedCluster finalizers
kubectl get hostedcluster -n <hc-namespace> <cluster-name> -o jsonpath='{.metadata.finalizers}'

# Review HO logs for HostedCluster deletion
kubectl logs -n hypershift deployment/operator --tail=200 | grep -i "hostedcluster.*<cluster-name>"

**What to look for:**

  • Finalizers blocking HostedCluster deletion
  • HO errors in reconciliation loop
  • Dependencies that haven't been cleaned up
  • Cloud resources that failed to delete

Quick Debugging Checklist

When investigating cluster deletion issues:

  • [ ] Check resource status and conditions
  • [ ] Review relevant operator logs (HO, CPO)
  • [ ] Inspect finalizers on stuck resources
  • [ ] Verify CAPI resources are reconciling
  • [ ] Check for events indicating failures
  • [ ] Look for provider errors
  • [ ] Verify namespace cleanup progress
  • [ ] Check for webhook or admission errors

Common Issues and Resolutions

Issue: NodePool won't delete

  • **Cause**: CAPI machines stuck due to provider errors
  • **Resolution**: Check provider credentials, investigate machine deletion errors in HO logs

Issue: Machines stuck in "Deleting" phase with "WaitingForInfrastructureDeletion"

  • **Cause**: Cluster resource deleted before machin
Read more
@openshift
Ships withhypershift

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.

55122 skills5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
551
Star history of openshift/hypershift on GitHub, a chart by star-history.com

Other skills on hypershift.

build-cpo-image

build-cpo-image

Build and push control-plane-operator container image. Auto-applies when testing CPO changes that require deploying to a live…

build-ho-image

build-ho-image

Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.

create-hc-aws

create-hc-aws

Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.

e2e-run-aws

e2e-run-aws

Provides the ability to run and iterate on HyperShift e2e tests. Auto-applies when implementing features that require e2e…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about debug-cluster.

Which coding agents can use debug-cluster?
debug-cluster installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.