# 使用 Homebrew 安装 kubekey

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

## 安装

```sh
sudo av install brew:kubekey
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kubekey
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:kubekey
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/kubekey>
- **版本:** 4.0.5
- **来源摘要:** Installer for Kubernetes and / or KubeSphere, and related cloud-native add-ons
- **主页:** <https://kubesphere.io>
- **仓库:** <https://github.com/kubesphere/kubekey>
- **上游文档:** <https://kubesphere.io>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/kubesphere/kubekey.git>
- **最后更新:** 2026-07-27T21:58:45+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- kk (cli)
- kk (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 4.0.5
- 管理器更新时间: 2026-07-27
- 本地数据: OK
- 上游仓库: https://github.com/kubesphere/kubekey
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

KubeKey is the KubeSphere ecosystem's installer and task-execution CLI for Kubernetes, KubeSphere, and related cloud-native add-ons. It is packaged as the kk executable and is used for cluster creation, upgrades, scaling, offline artifacts, and later task-flow style automation.

### 项目历史

The public GitHub repository was created on March 19, 2020. KubeSphere documentation from the KubeKey installation guide refers to KubeKey version 1.0.1, and the repository README describes KubeKey as an open source lightweight task-flow execution tool that provides a flexible way to install Kubernetes.

The README says the 3.x line expanded KubeKey from a Kubernetes lifecycle-management tool into a task-execution tool with template management and multiple connection methods. The 4.x release packaging also includes web-installer assets, schema files, task templates, and offline package tooling.

### 采用历史

KubeKey adoption is tied closely to KubeSphere installation and lifecycle management. It became the path for installing Kubernetes alone or installing Kubernetes and KubeSphere together, especially for users who wanted all-in-one, multi-node, highly available, or offline setups.

The project is less broadly packaged than kubectx or kubelogin, but its Homebrew formula is useful for operators who want the kk binary installed through the same package manager as kubectl and other cluster tools.

### 使用方式

A common workflow is to run kk create config to generate config-sample.yaml, edit host and cluster settings, and then run kk create cluster -f config-sample.yaml. The repository documentation also covers node add/delete operations, certificate renewal, offline artifact export, image registry setup, and dependency packages.

KubeKey's configuration file can include host connection details, Kubernetes version, networking, registry mirrors, and add-ons. That makes it closer to an installer plus declarative cluster recipe than a single-purpose kubectl plugin.

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

KubeKey is notable because it packages a full Kubernetes/KubeSphere installer as a single CLI binary. For package-manager users, kk sits in the same mental bucket as kubeadm wrappers and distribution installers: a bootstrap executable whose version controls a large amount of cluster state.

### 时间线

- 2020-03-19: Public GitHub repository created
- 2021: KubeSphere installation documentation referenced KubeKey version 1.0.1
- 2023: 3.x README described expansion from lifecycle management to task execution
- 2026-06-05: v4.0.5 release published

### Related projects

- KubeSphere is the platform ecosystem for which KubeKey is an installer and lifecycle tool.
- kubeadm is listed among the repository topics and is part of the broader Kubernetes bootstrap context.
- Ansible is referenced by the README as an inspiration for KubeKey's task-flow design.

### 来源

- <https://api.github.com/repos/kubesphere/kubekey>
- <https://formulae.brew.sh/formula/kubekey>
- <https://github.com/kubesphere/kubekey>
- <https://github.com/kubesphere/kubekey/releases>
- <https://github.com/kubesphere/kubekey/tree/main/docs>
- <https://kubesphere.io/blogs/install-kubernetes-using-kubekey/>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: config-sample.yaml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** kubekey
- **Aliases:** kk
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [kubeconform](https://pkg.so/zh-hans/brew/kubeconform/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [minikube](https://pkg.so/zh-hans/brew/minikube/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [kind](https://pkg.so/zh-hans/brew/kind/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [kubectx](https://pkg.so/zh-hans/brew/kubectx/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [kubelogin](https://pkg.so/zh-hans/brew/kubelogin/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [krew](https://pkg.so/zh-hans/brew/krew/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [kube-linter](https://pkg.so/zh-hans/brew/kube-linter/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [kubebuilder](https://pkg.so/zh-hans/brew/kubebuilder/) - Shares pkgdb curated category or tags: cli, developer-tools, kubernetes.
- [porter](https://pkg.so/zh-hans/brew/porter/) - Local package facts share a topical domain. Shared terms: cli, cloud, cloud-native, developer, developer-tools.
- [karmadactl](https://pkg.so/zh-hans/brew/karmadactl/) - Local package facts share a topical domain. Shared terms: cli, cluster, developer, developer-tools, kubernetes.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
