# 使用 Homebrew, chocolatey, Nix, zypper, scoop, winget, apk 安装 kubelogin

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

## 安装

```sh
sudo av install brew:kubelogin
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kubelogin
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#kubelogin
```

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

- zypper (92%):

```sh
sudo zypper install kubelogin
```

  证据: openSUSE Tumbleweed package metadata: kubelogin from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- apk (92%):

```sh
sudo apk add kubectl-oidc_login
```

  证据: Alpine Linux edge package indexes: kubectl-oidc_login from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

### Windows

- Chocolatey (92%):

```sh
choco install kubelogin
```

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

- Scoop (92%):

```sh
scoop install extras/kubelogin
```

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

- winget (92%):

```sh
winget install --id int128.kubelogin -e
```

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

## 软件包事实

- **软件包键:** brew:kubelogin
- **软件包管理器:** Homebrew
- **版本:** 1.36.3
- **来源摘要:** OpenID Connect authentication plugin for kubectl
- **主页:** <https://github.com/int128/kubelogin>
- **仓库:** <https://github.com/int128/kubelogin>
- **最后更新:** 2026-07-27T21:58:46+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- kubectl-oidc_login (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

int128/kubelogin is a kubectl plugin for Kubernetes OpenID Connect authentication, also known as kubectl oidc-login. It became important as Kubernetes client authentication moved toward exec credential plugins and as clusters increasingly delegated user login to OIDC identity providers.

### 项目历史

The public GitHub repository was created on March 21, 2018. The README identifies kubelogin as a kubectl plugin for Kubernetes OIDC authentication and explains that it is designed to run as a client-go credential plugin.

The project tracks Kubernetes exec credential APIs and browser-based OIDC login flows. Its CLI can be invoked through kubectl plugin naming as kubectl oidc-login, and it stores token cache data in the filesystem by default with an option to use the system keyring.

### 采用历史

kubelogin gained adoption because Kubernetes documented client-go credential plugins as a stable feature in Kubernetes v1.22. That mechanism lets kubectl and client-go execute an external command to receive user credentials for authentication protocols such as OAuth2 and SAML.

The README documents installation through Homebrew, Krew, Chocolatey, and GitHub Releases. The package also appears in apk, Nix, Scoop, winget, and zypper metadata in the batch input, showing that an authentication helper crossed from Kubernetes plugin culture into general OS package managers.

### 使用方式

When kubectl runs, kubelogin opens a browser for the user to authenticate with an OIDC provider, obtains a token, and returns Kubernetes ExecCredential output for client-go. The kubeconfig user.exec stanza points to the plugin command and arguments.

The default token cache path documented by the README is ~/.kube/cache/oidc-login, and kubectl oidc-login clean deletes cached credentials so the next kubectl run starts a fresh browser login.

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

kubelogin is significant because it is both a kubectl plugin and a security-sensitive credential helper. Packaging matters here: users want a reproducible binary from Homebrew, Krew, Chocolatey, or distro packages because the tool participates directly in Kubernetes API authentication.

### 时间线

- 2018-03-21: Public GitHub repository created
- 2021: Kubernetes v1.22 marked client-go credential plugins stable
- 2026-05-30: v1.36.2 release published
- 2026: README documented Homebrew, Krew, Chocolatey, and GitHub Releases installation paths

### Related projects

- Kubernetes client-go credential plugins provide the exec-plugin mechanism kubelogin implements.
- Krew distributes kubelogin as the oidc-login kubectl plugin.
- OpenID Connect and OAuth2 identity providers are the authentication systems kubelogin bridges into kubectl.

### 来源

- <https://api.github.com/repos/int128/kubelogin>
- <https://formulae.brew.sh/formula/kubelogin>
- <https://github.com/int128/kubelogin>
- <https://github.com/int128/kubelogin/releases>
- <https://kubernetes.io/docs/reference/access-authn-authz/authentication/>
- <https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/>


## 安全说明

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: ~/.kube/config

## Credential files

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

- Nix - kubelogin: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubelogin/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- zypper - kubelogin - 0.2.19-1.3: normalized package name match | openSUSE Tumbleweed package metadata: kubelogin from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Kubernetes client credential plugin implementing Azure authentication | https://github.com/Azure/kubelogin
- Chocolatey - kubelogin: normalized package name match | Chocolatey community package catalog: kubelogin from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'
- Scoop - extras/kubelogin: normalized package name match | Scoop official bucket manifest trees: bucket/kubelogin.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1
- winget - int128.kubelogin: normalized package name match | Windows Package Manager source index: int128.kubelogin from https://cdn.winget.microsoft.com/cache/source.msix
- apk - kubectl-oidc_login - 1.35.2-r4: installed executable or alias match | Alpine Linux edge package indexes: kubectl-oidc_login from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | kubectl plugin for Kubernetes OpenID Connect authentication | https://github.com/int128/kubelogin


## Combined YAML source

View the package source record on GitHub. [combined/kubelogin.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kubelogin.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
