Skip to content

carapace-sh/carapace-bin / skills/kubeadm

kubeadm

Unverified

Use 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".

FileKindSize
SKILL.mdskill md5.1 KB
references/certs.mdmarkdown7.5 KB
references/concepts.mdmarkdown8.3 KB
references/config.mdmarkdown10.3 KB
references/flags.mdmarkdown6.7 KB
references/init.mdmarkdown7.8 KB
references/join.mdmarkdown7.1 KB
references/misc.mdmarkdown3.2 KB
references/phases.mdmarkdown9.4 KB
references/reset.mdmarkdown4.4 KB
references/token.mdmarkdown5.2 KB
references/upgrade.mdmarkdown7.7 KB

references/flags.md

View on GitHub
# Global and Common Flags

The flags shared across kubeadm commands — global flags, preflight error handling, patches, CRI socket selection, and the `--kubeconfig` flag.

> **Source of truth**: <https://kubernetes.io/docs/reference/setup-tools/kubeadm/>. For command-specific flags, see the individual command references.

## Global Flags

These flags are available on all kubeadm commands (defined on the root command):

| Flag | Description |
|------|-------------|
| `--rootfs` | Path to the 'real' host root filesystem. kubeadm will chroot into the provided path. Useful for testing or operating on a mounted disk. |
| `--v` | Number for the log level verbosity. Higher = more verbose (e.g. `--v=5`). |
| `--vmodule` | Comma-separated list of `pattern=N` settings for file-filtered logging. |

### `--rootfs`

Causes kubeadm to chroot into the specified path before running. This is useful when:
- Repairing a node from a live USB/recovery environment
- Operating on a mounted disk image
- Testing kubeadm against a fake filesystem

```bash
kubeadm init --rootfs /mnt/host
```

## `--kubeconfig`

Used by commands that talk to an existing cluster (`token`, `config`, `upgrade`, `reset`, `certs`).

| Default | Description |
|---------|-------------|
| `/etc/kubernetes/admin.conf` | The kubeconfig file to use when talking to the cluster. |

If not set, kubeadm searches standard locations for an existing kubeconfig file. The admin kubeconfig generated by `init` is at `/etc/kubernetes/admin.conf`.

```bash
kubeadm upgrade apply v1.30.0 --kubeconfig /custom/path/admin.conf
```

## `--dry-run`

Available on `init`, `join`, `reset`, `upgrade apply`, `upgrade node`, and `token create`.

Outputs what would be done without applying any changes. Useful for:
- Validating a configuration before committing
- Previewing the upgrade diff
- Testing preflight checks

```bash
kubeadm init --dry-run
kubeadm upgrade apply v1.30.0 --dry-run
```

## `--ignore-preflight-errors`

Available on all commands that run preflight checks (`init`, `join`, `reset`, `upgrade apply`, `upgrade node`).

A comma-separated list of check names whose errors will be shown as warnings instead of causing a failure. The special value `all` ignores errors from all checks.

```bash
kubeadm init --ignore-preflight-errors=Swap,IsPrivilegedUser
kubeadm init --ignore-preflight-errors=all
```

### Preflight Checks

| Check | Description |
|-------|-------------|
| `ContainerRuntime` | Container runtime (Docker/containerd) is installed and running |
| `DirAvailable` | Required directories are available |
| `ExternalEtcdVersion` | External etcd version is compatible |
| `FileAvailable` | Required files are available |
| `FileContent` | File contents are valid |
| `FileExisting` | Required files exist |
| `Firewalld` | Firewalld is not active (can interfere with ports) |
| `HTTPProxy` | HTTP proxy settings |
| `HTTPProxyCIDR` | HTTP proxy CIDR settings |
| `Hostname` | Hostname is valid |
| `ImagePull` | Can pull required images |
| `InPath` | Required binaries are in PATH |
| `IsPrivilegedUser` | Running as root/privileged user |
| `KubeletVersion` | Kubelet version is compatible |
| `KubernetesVersion` | Kubernetes version is valid |
| `Mem` | Sufficient memory available |
| `NumCPU` | Sufficient CPU cores |
| `PortOpen` | Required ports are available |
| `Service` | Required services are active |
| `Swap` | Swap is disabled (Kubernetes requires no swap) |
| `SystemVerification` | System meets requirements |
| `all` | Ignore all preflight errors (special value) |

**Warning**: Using `all` or ignoring critical checks like `IsPrivilegedUser` can lead to a broken cluster. Use selectively and understand each check you're suppressing.

## `--cri-socket`

Available on `init`, `join`, `reset`, and `config images pull`.

Specifies the path to the CRI (Container Runtime Interface) socket. If empty, kubeadm auto-detects the socket. Use this only if:
- You have more than one CRI installed (e.g. both containerd and CRI-O)
- You have a non-standard CRI socket path

```bash
kubeadm init --cri-socket unix:///var/run/containerd/containerd.sock
kubeadm init --cri-socket unix:///var/run/crio/crio.sock
```

## `--patches`

Available on `init`, `join`, `upgrade apply`, and `upgrade node`.

Path to a directory containing patch files for static Pod manifests and component configurations. This allows customizing control plane components without modifying the kubeadm config.

### Patch File Naming

```
target[suffix][+patchtype].extension
```

| Component | Target name |
|-----------|-------------|
| API Server | `kube-apiserver` |
| Controller Manager | `kube-controller-manager` |
| Scheduler | `kube-scheduler` |
| etcd | `etcd` |
| Kubelet config | `kubeletconfiguration` |
| CoreDNS deployment | `corednsdeployment` |

| Patch type | Description |
|------------|-------------|
| `strategic` | Strategic merge (default) |
| `merge` | JSON merge patch |
| `json` | JSON patch (RFC 6902) |

| Extension | Format |
|-----------|--------|
| `.yaml` | YAML |
| `.json` | JSON |

### Examples

```bash
# Apply patches from a directory
kubeadm init --patches /path/to/patches
```

Patch file examples:
- `kube-apiserver+merge.yaml` — JSON merge patch for the API server
- `kube-apiserver0+strategic.yaml` — Strategic merge patch, applied first (suffix `0`)
- `etcd.json` — JSON patch for etcd

The optional `suffix` is an alphanumeric string that determines application order when multiple patches target the same component.

### How Patches Work

Patches are applied to the generated static Pod manifests before they are written to `/etc/kubernetes/manifests/`. This lets you add extra args, volumes, environment variables, or other customizations to control plane components.

## `--config`

Available on most commands. Passes a YAML configuration file instead of using individual flags. See [config.md](config.md) for the full configuration API.

```bash
kubeadm init --config kubeadm-init.yaml
kubeadm join 10.0.0.1:6443 --config kubeadm-join.yaml
```

## `--skip-phases`

Available on `init`, `join`, `reset`, `upgrade apply`, and `upgrade node`. See [phases.md](phases.md) for details.

## `--feature-gates`

Available on `init`, `join`, and `config images` commands. See [concepts.md](concepts.md) for the feature gate lifecycle and current gates.

```bash
kubeadm init --feature-gates NodeLocalCRISocket=true
```

## References

- [kubeadm CLI overview](https://kubernetes.io/docs/reference/setup-tools/kubeadm/)
- [Patching kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)

## Related

- [phases.md](phases.md) — `--skip-phases` and the phase system
- [config.md](config.md) — the `--config` file API
- [concepts.md](concepts.md) — feature gates
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall