# Install kubernetes-cli with Homebrew, chocolatey, winget, apk, apt, MacPorts, Nix, pacman, scoop

Kubernetes command-line interface. Version 1.36.2 via Homebrew; verified 2026-06-12.

## Install

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

## Agent safety answer

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

- **Credential access:** Reads kubeconfig, exec credentials, cluster tokens, and namespace context.
- **Remote mutation:** Can create, patch, delete, scale, and exec into cluster workloads.
- **Publish/artifact risk:** Can apply manifests that deploy or expose application artifacts.
- **Recommended control:** Gate kubectl apply, delete, patch, exec, port-forward, and context changes.
- **Agent-use guidance:** Allow get/describe with safe contexts; require approval for cluster writes and secret reads.

Additional install commands:

### macOS

- Homebrew (100%):

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

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install kubectl
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

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

- winget (92%):

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

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

- Scoop (92%):

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

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

## Package facts

- **Package key:** brew:kubernetes-cli
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/kubernetes-cli>
- **Version:** 1.36.2
- **Source summary:** Kubernetes command-line interface
- **Homepage:** <https://kubernetes.io/docs/reference/kubectl/>
- **Repository:** <https://github.com/kubernetes/kubernetes>
- **Upstream docs:** <https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/kubernetes/kubernetes.git>
- **Last updated:** 2026-06-12T13:38:45Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- kubectl (cli)
- kubectl (alias)

## Build dependencies

- bash
- coreutils
- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.36.2
- Package-manager updated: 2026-06-12
- Local data: ok
- Upstream repository: https://github.com/kubernetes/kubernetes
- info: No cached GitHub release or tag data was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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/>


## Security Notes

cluster orchestration infrastructure.

- **Geiger risk:** orange / high
- 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
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** kubernetes-cli
- **Aliases:** kubectl, kubernetes-cli@1.36
- **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

## Other Package-Manager Records

- 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','kubectx'
- 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.1-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.1-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


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [bash](https://www.automicvault.com/pkg/brew/bash/) - Build dependency declared by Homebrew.
- [coreutils](https://www.automicvault.com/pkg/brew/coreutils/) - Build dependency declared by Homebrew.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [devspace](https://www.automicvault.com/pkg/brew/devspace/) - Popular package that depends on this formula.
- [helmsman](https://www.automicvault.com/pkg/brew/helmsman/) - Popular package that depends on this formula.
- [kops](https://www.automicvault.com/pkg/brew/kops/) - Popular package that depends on this formula.
- [krane](https://www.automicvault.com/pkg/brew/krane/) - Popular package that depends on this formula.
- [krew](https://www.automicvault.com/pkg/brew/krew/) - Popular package that depends on this formula.
- [kube-ps1](https://www.automicvault.com/pkg/brew/kube-ps1/) - Popular package that depends on this formula.
- [kubectl-tree](https://www.automicvault.com/pkg/brew/kubectl-tree/) - Popular package that depends on this formula.
- [minikube](https://www.automicvault.com/pkg/brew/minikube/) - Popular package that depends on this formula.
- [cmctl](https://www.automicvault.com/pkg/brew/cmctl/) - Shares av.db curated category or tags: cli, cluster-management, developer-tools, kubernetes.
- [kubecm](https://www.automicvault.com/pkg/brew/kubecm/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubecolor](https://www.automicvault.com/pkg/brew/kubecolor/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubectl-ai](https://www.automicvault.com/pkg/brew/kubectl-ai/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubectx](https://www.automicvault.com/pkg/brew/kubectx/) - Shares av.db curated category or tags: cli, developer-tools, kubectl, kubernetes.
- [kubekey](https://www.automicvault.com/pkg/brew/kubekey/) - Shares av.db curated category or tags: cli, cluster-management, developer-tools, kubernetes.

## Combined YAML source

View the package source record on GitHub. [combined/kubernetes-cli.yml](https://github.com/automic-vault/db/blob/main/combined/kubernetes-cli.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
