carapace-sh/carapace-bin / skills/kubeadm
kubeadm
UnverifiedUse when working with the kubeadm CLI — bootstrapping Kubernetes clusters, init/join/reset/upgrade workflows, the phase system, certificate management, bootstrap tokens, kubeconfig generation, and the v1beta4 configuration API. Triggers on: "kubeadm", "kubeadm init", "kubeadm join", "kubeadm reset", "kubeadm upgrade", "kubeadm config", "kubeadm token", "kubeadm certs", "kubeadm kubeconfig", "kubeadm version", "kubeadm alpha", "bootstrap token", "InitConfiguration", "ClusterConfiguration", "JoinConfiguration", "ResetConfiguration", "NodeRegistrationOptions", "control-plane-endpoint", "discovery-token", "certificate-key", "feature-gates", "skip-phases", "static pod manifest", "TLS bootstrap", "kubeadm-config".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.1 KB |
| references/certs.md | markdown | 7.5 KB |
| references/concepts.md | markdown | 8.3 KB |
| references/config.md | markdown | 10.3 KB |
| references/flags.md | markdown | 6.7 KB |
| references/init.md | markdown | 7.8 KB |
| references/join.md | markdown | 7.1 KB |
| references/misc.md | markdown | 3.2 KB |
| references/phases.md | markdown | 9.4 KB |
| references/reset.md | markdown | 4.4 KB |
| references/token.md | markdown | 5.2 KB |
| references/upgrade.md | markdown | 7.7 KB |
references/reset.md
View on GitHub# kubeadm reset — Teardown
The `kubeadm reset` command performs a best-effort revert of changes made to a host by `kubeadm init` or `kubeadm join`. It cleans up certificates, kubeconfig files, static Pod manifests, and removes the node from the cluster (including etcd membership for control-plane nodes).
> **Source of truth**: <https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/>. For the phase tree, see [phases.md](phases.md).
## Synopsis
```
kubeadm reset [flags]
```
## What reset Does
1. **Preflight checks** — validates state before cleanup
2. **Remove etcd member** (control-plane nodes only) — removes the local etcd member from the cluster
3. **Cleanup node** — removes:
- `/etc/kubernetes/manifests/` (static Pod manifests)
- `/etc/kubernetes/pki/` (certificates)
- `/etc/kubernetes/*.conf` (kubeconfig files)
- kubelet configuration
- CRI containers and volumes created by kubeadm
## What reset Does NOT Do
- Clean CNI configuration (`/etc/cni/net.d`)
- Remove iptables / nftables / IPVS rules
- Remove `$HOME/.kube/config`
- Delete external etcd data (only affects stacked etcd)
You must clean these up manually if needed.
## Phase Tree
```
preflight Run reset pre-flight checks
remove-etcd-member Remove a local etcd member (control-plane nodes only)
cleanup-node Run cleanup node (remove certs, configs, manifests)
```
See [phases.md](phases.md) for invoking individual phases.
## Flags
| Flag | Default | Description |
|------|---------|-------------|
| `--cert-dir` | `/etc/kubernetes/pki` | Path to certificates directory to clean. |
| `--cleanup-tmp-dir` | `false` | Cleanup `/etc/kubernetes/tmp` directory. |
| `--config` | — | Path to a kubeadm configuration file (v1beta4 `ResetConfiguration`). |
| `--cri-socket` | auto-detect | Path to the CRI socket. |
| `--dry-run` | `false` | Output what would be done without applying. |
| `-f, --force` | `false` | Reset without prompting for confirmation. |
| `--ignore-preflight-errors` | — | Checks to treat as warnings. See [flags.md](flags.md). |
| `--kubeconfig` | `/etc/kubernetes/admin.conf` | Kubeconfig file to use for talking to the cluster. |
| `--skip-phases` | — | Phases to skip. See [phases.md](phases.md). |
### Inherited (global) flags
| Flag | Description |
|------|-------------|
| `--rootfs` | Path to the 'real' host root filesystem. |
| `--v` | Log level verbosity. |
| `--vmodule` | Comma-separated `pattern=N` for file-filtered logging. |
## `--force`
Skips the interactive confirmation prompt. Useful for scripting:
```bash
kubeadm reset --force
```
## `--cleanup-tmp-dir`
Also removes `/etc/kubernetes/tmp`, which contains temporary working files from the last `init` or `join`. Without this flag, the tmp directory is left intact.
## Removing etcd Membership
For control-plane nodes with stacked etcd, the `remove-etcd-member` phase removes the local etcd member from the cluster before cleaning up. This prevents the cluster from having a dead etcd member.
If the etcd cluster has already lost this member (e.g. the node is being reset after a failure), you may need to skip this phase:
```bash
kubeadm reset --skip-phases=remove-etcd-member
```
## Config File (v1beta4)
In v1beta4, `kubeadm reset` accepts a `ResetConfiguration` via `--config`:
```yaml
apiVersion: kubeadm.k8s.io/v1beta4
kind: ResetConfiguration
cleanupTmpDir: true
certificatesDir: /etc/kubernetes/pki
force: true
ignorePreflightErrors:
- all
```
See [config.md](config.md) for the full `ResetConfiguration` API.
## Edge Cases
- **Stale etcd members**: If a control-plane node is already down and you're resetting it, the etcd member may already be removed. Use `--skip-phases=remove-etcd-member`.
- **CNI cleanup**: `reset` does not remove CNI config or network rules. Manually clean `/etc/cni/net.d` and flush iptables/nftables if needed.
- **`$HOME/.kube/config`**: Not touched by reset. Remove manually if you want to clear the user's kubeconfig.
- **External etcd**: `reset` does not delete external etcd data. Only stacked etcd data (in the static Pod volume) is cleaned.
- **Dry run**: `--dry-run` shows what would be cleaned without removing anything.
## References
- [kubeadm reset docs](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/)
## Related
- [phases.md](phases.md) — reset phase tree
- [config.md](config.md) — `ResetConfiguration` in v1beta4
- [flags.md](flags.md) — common flags like `--ignore-preflight-errors`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |