# 使用 Homebrew, Nix 安装 kn

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

## 安装

```sh
sudo av install brew:kn
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kn
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#kn
```

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

## 软件包事实

- **软件包键:** brew:kn
- **软件包管理器:** Homebrew
- **版本:** 1.23.0
- **来源摘要:** Command-line interface for managing Knative Serving and Eventing resources
- **主页:** <https://github.com/knative/client>
- **仓库:** <https://github.com/knative/client>
- **最后更新:** 2026-07-29T18:10:56Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- kn (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

`kn` is the official Knative command-line client, built to let users create and manage Knative Serving and Eventing resources without writing Kubernetes YAML by hand.

### 项目历史

Knative was released by Google in July 2018 as a serverless application layer on Kubernetes, with early collaboration from VMware, IBM, Red Hat, and SAP. The `kn` client emerged as the developer-facing command surface for that ecosystem; GitHub release data shows Knative Client v0.1.0 published on 2019-05-18.

The client documentation describes `kn` as an interface for Knative Services and Event Sources, including higher-level operations such as autoscaling and traffic splitting. The repository README also documents support for Serving resources, growing Eventing support, plugin architecture, and use from scripts or Tekton tasks.

### 采用历史

The client tracks Knative's own maturation. Knative 1.0 was announced in 2021 with over 600 contributors and described Knative as the most widely installed serverless layer on Kubernetes. CNCF accepted Knative as an incubating project on 2022-03-02 and later listed it as graduated on 2025-09-11, which strengthened `kn` as the default CLI interface for a vendor-neutral cloud-native project.

### 使用方式

Users run `kn` to create services, list and inspect resources, split traffic between revisions, work with Eventing sources and triggers, and script Knative workflows. Its documented configuration uses `~/.config/kn/config.yaml` on Unix systems, while cluster credentials usually come from Kubernetes kubeconfig handling such as `~/.kube/config` or `KUBECONFIG`.

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

`kn` matters because it packages a complex Kubernetes CRD ecosystem into a small Go CLI. For package maintainers, it is part of the broader pattern where cloud-native projects ship a narrowly scoped binary that wraps Kubernetes APIs while still relying on kubeconfig and shell completion conventions users already know.

### 时间线

- 2018-07: Google released Knative, later described by Knative 1.0 materials as developed with VMware, IBM, Red Hat, and SAP.
- 2019-05-18: Knative Client v0.1.0 published on GitHub.
- 2020-10-07: Knative Client v0.18.0 released with additional Eventing support.
- 2021: Knative 1.0 announced as a production-readiness milestone with over 600 contributors.
- 2022-03-02: CNCF accepted Knative as an incubating project.
- 2025-09-11: CNCF project page lists Knative as moving to graduated maturity.

### Related projects

- `kn` is related to Knative Serving, Knative Eventing, Kubernetes, kubectl plugin conventions, Tekton, CloudEvents, and distribution-specific serverless platforms such as OpenShift Serverless.

### 来源

- <https://api.github.com/repos/knative/client/releases?per_page=100>
- <https://github.com/knative/client>
- <https://knative.dev/blog/releases/knative-1.0/>
- <https://knative.dev/docs/client/>
- <https://knative.dev/docs/client/configure-kn/>
- <https://knative.dev/docs/client/install-kn/>
- <https://www.cncf.io/projects/knative/>


## 安全说明

narrow executable package without higher-risk signals.

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


## 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/kn/config.yaml

## Credential files

- Unix: ~/.kube/config
## 其他软件包管理器记录

- Nix - kn: normalized package name match | nixpkgs package indexes: pkgs/by-name/kn/kn/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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