k8s-clean-cluster

Remove orphaned Kurtosis resources from a Kubernetes cluster.

547|97|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/kurtosis-tech/kurtosis --skill k8s-clean-cluster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-clean-cluster
Source: https://github.com/kurtosis-tech/kurtosis/tree/main/skills/k8s-clean-cluster
Command: npx skills add https://github.com/kurtosis-tech/kurtosis --skill k8s-clean-cluster

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Force-clean all Kurtosis resources from a Kubernetes cluster when kurtosis clean hangs or fails. Removes all kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings. Use when kurtosis clean -a hangs or leaves behind orphaned resources.

Core Features & Use Cases

  • Force-clean all Kurtosis resources from a Kubernetes cluster when the normal kurtosis clean -a command hangs or fails.
  • Remove orphaned Kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings.
  • Use case: when kurtosis clean -a hangs, encounters failures, or leaves behind residual resources that block engine startup.

Quick Start

Execute the force-clean operation to remove Kurtosis resources from the cluster and prepare for a fresh engine restart.

Frequently Asked Questions about k8s-clean-cluster

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I force clean Kubernetes resources when kurtosis clean hangs?

Force-clean Kubernetes resources by deleting orphaned Kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings. This removes residual resources that block engine startup when the normal kurtosis clean -a command fails or hangs.

What Kurtosis resources are left behind in a Kubernetes cluster after a failed cleanup?

Orphaned Kurtosis resources in a Kubernetes cluster include namespaces, pods, daemonsets, cluster roles, and cluster role bindings. These residual resources block engine startup and require forceful deletion via kubectl to restore a clean cluster state.

Do I need kubectl permissions to delete cluster-scoped resources for Kurtosis cleanup?

Yes, you need kubectl access to the target Kubernetes cluster with appropriate permissions to delete both cluster-scoped and namespace-scoped resources. This access is required to successfully remove all Kurtosis resources and prepare for a fresh engine restart.

Why does kurtosis clean -a leave resources behind in Kubernetes?

Kurtosis clean -a may leave behind resources due to failures or hangs during the deletion process. When this happens, orphaned namespaces, pods, and cluster roles remain in the Kubernetes cluster, requiring a force-clean operation to ensure a completely clean state.

Can I manually remove orphaned Kurtosis namespaces and cluster roles with kubectl?

Yes, you can manually remove orphaned Kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings using kubectl. A force-clean operation automates this deletion to reliably remediate residual resources when standard cleanup fails.

When should I force-clean Kurtosis resources instead of using kurtosis clean -a?

Force-clean Kurtosis resources when kurtosis clean -a hangs, encounters failures, or leaves behind residual resources that block engine startup. This approach ensures a clean Kubernetes cluster state for a fresh engine restart.