# kubernetes-cli を Homebrew, chocolatey, winget, apk, apt, MacPorts, Nix, pacman, scoop でインストール

kubernetes-cli のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:kubernetes-cli
```

## エージェント安全性の回答

kubernetes-cli provides kubectl, which controls Kubernetes clusters and workloads.

- **認証情報アクセス:** Reads kubeconfig, exec credentials, cluster tokens, and namespace context.
- **リモート変更:** Can create, patch, delete, scale, and exec into cluster workloads.
- **公開/成果物リスク:** Can apply manifests that deploy or expose application artifacts.
- **推奨コントロール:** Gate kubectl apply, delete, patch, exec, port-forward, and context changes.
- **エージェント利用ガイダンス:** Allow get/describe with safe contexts; require approval for cluster writes and secret reads.

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install kubernetes-cli
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install kubectl
```

  証拠: MacPorts ports tree: sysutils/kubectl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add kubectl
```

  証拠: Alpine Linux edge package indexes: kubectl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install kubectl
```

  証拠: Debian stable package indexes: kubectl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#kubectl
```

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

- pacman (92%):

```sh
sudo pacman -S kubectl
```

  証拠: Arch Linux sync databases: kubectl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Chocolatey (92%):

```sh
choco install kubernetes-cli
```

  証拠: Chocolatey community package catalog: kubernetes-cli from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'

- winget (92%):

```sh
winget install --id Kubernetes.kubectl -e
```

  証拠: Windows Package Manager source index: Kubernetes.kubectl from https://cdn.winget.microsoft.com/cache/source.msix

- Scoop (92%):

```sh
scoop install main/kubectl
```

  証拠: Scoop official bucket manifest trees: bucket/kubectl.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:kubernetes-cli
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.36.3
- **ソース概要:** Kubernetes command-line interface
- **ホームページ:** <https://kubernetes.io/docs/reference/kubectl/>
- **リポジトリ:** <https://github.com/kubernetes/kubernetes>
- **最終更新:** 2026-07-23T03:43:20Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- kubectl (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.36.3
## プロジェクトの歴史と使われ方

kubectl is the Kubernetes command-line client and the binary packaged by Homebrew as kubernetes-cli. It is the standard local interface for sending requests to the Kubernetes control plane, reading and writing objects, inspecting resources, and driving day-to-day cluster operations.

### プロジェクトの歴史

Kubernetes began as an open source Google project in 2014 and reached version 1.0 on July 21, 2015, alongside Google's announcement that the project would be donated to the newly formed Cloud Native Computing Foundation. kubectl evolved with the project as the human-facing client for the Kubernetes API.

### 採用の歴史

As Kubernetes became the common substrate for cloud-native infrastructure, kubectl became one of the most widely installed operations binaries in developer and platform-engineering toolchains. Its packaging across Homebrew, Linux distributions, Chocolatey, Scoop, winget, Nix, MacPorts, and other systems reflects that it is both a developer tool and an infrastructure administration tool.

### 使われ方

kubectl reads kubeconfig data to select a cluster, user, namespace, and context, then communicates with the API server. Kubernetes documentation says kubectl looks for config in $HOME/.kube/config by default, while KUBECONFIG and --kubeconfig allow explicit or merged configuration files.

### パッケージ好きにとっての重要性

The kubernetes-cli package is significant because it decouples the local client from a full Kubernetes installation. Package managers let users pin or upgrade the client, match cluster version-skew policy, and keep scripts using a predictable kubectl binary without installing control-plane components.

### タイムライン

- 2014: Kubernetes was released as an open source project.
- 2015-07-21: Kubernetes 1.0 was released and the project was donated to the CNCF.
- 2023-08-15: Kubernetes documented pkgs.k8s.io as community-owned package repositories for Kubernetes packages.
- 2025-04-23: Kubernetes v1.33 was released.
- 2025-08-27: Kubernetes v1.34 was released.

### Related projects

- kubectl is related to the Kubernetes API server, kubeconfig, client-go, kubeadm, kustomize, Helm, kubectl plugins, and the broader SIG CLI tooling ecosystem.

### ソース

- <https://kubernetes.io/blog/2024/06/06/10-years-of-kubernetes/>
- <https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/>
- <https://kubernetes.io/docs/reference/kubectl/>
- <https://kubernetes.io/releases/>


## セキュリティノート

cluster orchestration infrastructure.

- **Geiger リスク:** orange / 高
- cluster orchestration infrastructure


## 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/config
## 他のパッケージマネージャ記録

- Chocolatey - kubernetes-cli: normalized package name match | Chocolatey community package catalog: kubernetes-cli from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'
- winget - Kubernetes.kubectl: normalized package name match | Windows Package Manager source index: Kubernetes.kubectl from https://cdn.winget.microsoft.com/cache/source.msix
- MacPorts - kubectl: installed executable or alias match | MacPorts ports tree: sysutils/kubectl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - kubectl - 1.32.3+ds-2: installed executable or alias match | Debian stable package indexes: kubectl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Command-line tool for controlling Kubernetes clusters | https://kubernetes.io/
- Nix - kubectl: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/ku/kubectl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - kubectl - 1.36.3-r0: installed executable or alias match | Alpine Linux edge package indexes: kubectl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Kubernetes - kubectl | https://kubernetes.io/
- pacman - kubectl - 1.36.3-1: installed executable or alias match | Arch Linux sync databases: kubectl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A command line tool for communicating with a Kubernetes API server | https://kubernetes.io/
- Scoop - main/kubectl: installed executable or alias match | Scoop official bucket manifest trees: bucket/kubectl.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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