# 使用 Homebrew, chocolatey, MacPorts, Nix, scoop, winget 安装 k3d

查看 k3d 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:k3d
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install k3d
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install k3d
```

  证据: MacPorts ports tree: sysutils/k3d/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#k3d
```

  证据: nixpkgs package indexes: pkgs/by-name/k3/k3d/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Chocolatey (92%):

```sh
choco install k3d
```

  证据: Chocolatey community package catalog: k3d from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','java7u13x86'

- Scoop (92%):

```sh
scoop install main/k3d
```

  证据: Scoop official bucket manifest trees: bucket/k3d.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id k3d.k3d -e
```

  证据: Windows Package Manager source index: k3d.k3d from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:k3d
- **软件包管理器:** Homebrew
- **版本:** 5.9.0
- **来源摘要:** Little helper to run CNCF's k3s in Docker
- **主页:** <https://k3d.io>
- **仓库:** <https://github.com/k3d-io/k3d>
- **最后更新:** 2026-07-27T21:58:34+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- k3d (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.9.0
## 项目历史与用法

k3d is a lightweight wrapper for running k3s Kubernetes clusters inside Docker containers, aimed at fast local development, testing, and CI workflows.

### 项目历史

The k3d project traces its lineage to `zeerorg/k3s-in-docker`, was reimplemented in Go by Thorsten Klein, and was later adopted into Rancher before moving under the community-led k3d-io organization.

Public releases began in April 2019, shortly after k3s itself made lightweight Kubernetes a popular target for local and edge experimentation. The v0.3.0 release was described as the first release in Rancher space, and the v1.0.0 release followed later that month.

The project later went through larger rewrites and major-version lines, including the v3 and v5 eras, while keeping the same basic promise: create and destroy containerized k3s clusters quickly from a single CLI.

### 采用历史

k3d became popular with developers who wanted a real Kubernetes API locally without a virtual machine-heavy setup. It sits alongside kind and minikube, but its k3s base gives it a particularly small and quick profile.

The official k3s documentation lists k3d as a way to run k3s in Docker, which helped legitimize the tool for local development even though k3d's own README notes it is community-driven and not an official Rancher or SUSE product.

### 使用方式

Users commonly run `k3d cluster create` to start a local k3s cluster in Docker, then use kubeconfig output with kubectl and other Kubernetes tools. It is often used in CI jobs, demos, local operator development, and quick reproduction environments.

### 为什么软件包爱好者会关心

k3d is package-manager candy: one small CLI that summons an entire Kubernetes cluster by orchestrating Docker containers. It shows why local-cluster tools became standard developer dependencies once Kubernetes moved from production-only infrastructure into everyday application development.

### 时间线

- 2019: k3d v0.0.1 was released in April as a k3s-in-Docker helper.
- 2019: v0.3.0 was described as the first release in Rancher space.
- 2019: v1.0.0 was released later in April.
- 2020: v3 releases reflected a major rewrite and expanded cluster-management surface.
- 2022: v5.4.0 moved k3d images to GitHub Container Registry.

### Related projects

- k3d is built around k3s and Docker. It is commonly compared with kind and minikube, and it belongs to the broader family of local Kubernetes cluster tools.

### 来源

- <https://docs.k3s.io/advanced>
- <https://github.com/k3d-io/k3d>
- <https://github.com/k3d-io/k3d/discussions/1365>
- <https://github.com/k3d-io/k3d/releases/tag/v0.0.1>
- <https://github.com/k3d-io/k3d/releases/tag/v0.3.0>
- <https://github.com/orgs/k3d-io/packages/container/package/k3d>
- <https://k3d.io/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - k3d: normalized package name match | nixpkgs package indexes: pkgs/by-name/k3/k3d/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - k3d: normalized package name match | MacPorts ports tree: sysutils/k3d/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - k3d: normalized package name match | Chocolatey community package catalog: k3d from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','java7u13x86'
- Scoop - main/k3d: normalized package name match | Scoop official bucket manifest trees: bucket/k3d.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - k3d.k3d: normalized package name match | Windows Package Manager source index: k3d.k3d from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/k3d.yml](https://github.com/mxcl/pkgdb/blob/main/combined/k3d.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
