# kubectl-cnpg を Homebrew, apk, Nix, zypper でインストール

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

## インストール

```sh
sudo av install brew:kubectl-cnpg
```

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

### macOS

- Homebrew (100%):

```sh
brew install kubectl-cnpg
```

  証拠: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add kubectl-cnpg
```

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

- Nix (92%):

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

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

- zypper (92%):

```sh
sudo zypper install kubectl-cnpg
```

  証拠: openSUSE Tumbleweed package metadata: kubectl-cnpg from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:kubectl-cnpg
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.30.0
- **ソース概要:** CloudNativePG plugin for kubectl
- **ホームページ:** <https://cloudnative-pg.io/>
- **リポジトリ:** <https://github.com/cloudnative-pg/cloudnative-pg>
- **最終更新:** 2026-07-27T21:58:44+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- kubectl-cnpg (エイリアス)
- kubectl_complete-cnpg (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

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

kubectl-cnpg is the kubectl plugin shipped by the CloudNativePG project for managing PostgreSQL clusters on Kubernetes. The plugin is part of the main CloudNativePG repository rather than a separate utility repository.

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

The CloudNativePG GitHub repository was created on 2022-03-10. The project describes CloudNativePG as a platform for managing PostgreSQL databases in Kubernetes across the operational lifecycle, and its repository topics include `kubectl-plugin`, `operator`, `postgresql`, and high-availability concepts.

The kubectl plugin became one of the operator's user-facing control surfaces: the official plugin documentation covers installation scripts, Debian and RPM packages, AUR, Krew, Homebrew, supported architectures, completion, and command usage.

### 採用の歴史

The plugin's adoption follows CloudNativePG adoption rather than an independent CLI culture. The package appears in Homebrew, APK, Nix, and zypper, and the official docs name Homebrew and Krew as supported install paths for workstation users.

The repository metadata observed on 2026-07-01 showed more than 8000 GitHub stars for CloudNativePG, which makes kubectl-cnpg a plugin attached to a prominent Kubernetes database operator rather than a tiny standalone addon.

### 使われ方

After installation, users run commands as `kubectl cnpg COMMAND [ARGS...]`. The official documentation emphasizes management tasks such as generating installation manifests and interacting with CloudNativePG-managed database clusters.

The plugin uses the normal kubectl configuration path through `~/.kube/config`, so it fits existing Kubernetes authentication and context workflows rather than defining a separate credentials store.

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

kubectl-cnpg is interesting as a packaged operator companion: the binary is distributed across OS package systems even though its value is tied to a cluster-side controller. It shows how serious Kubernetes operators often grow their own kubectl plugin for operational ergonomics.

### タイムライン

- 2022-03-10: CloudNativePG repository created.
- 2025-05-08: CloudNativePG release v1.29.1 published.
- 2026-06-29: CloudNativePG release v1.30.0 published, with plugin package examples in the documentation using v1.30.0 assets.

### Related projects

- Related projects include Kubernetes, kubectl, Krew, PostgreSQL, and the CloudNativePG operator. The package is not a general PostgreSQL client; it is an operational frontend for CloudNativePG resources.

### ソース

- <https://api.github.com/repos/cloudnative-pg/cloudnative-pg>
- <https://cloudnative-pg.io/docs/devel/kubectl-plugin>
- <https://cloudnative-pg.io/documentation/current/kubectl-plugin>
- <https://formulae.brew.sh/formula/kubectl-cnpg>
- <https://github.com/cloudnative-pg/cloudnative-pg>
- <https://krew.sigs.k8s.io/docs/user-guide/setup/install/>


## セキュリティノート

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

- Nix - kubectl-cnpg: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubectl-cnpg/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - kubectl-cnpg - 1.30.0-r1: normalized package name match | Alpine Linux edge package indexes: kubectl-cnpg from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | kubectl plugin for cloudnative-pg | https://github.com/cloudnative-pg/cloudnative-pg
- zypper - kubectl-cnpg - 1.29.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-cnpg from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Manage PostgreSQL clusters built using CloudNativePG | https://github.com/cloudnative-pg/cloudnative-pg
- zypper - kubectl-cnpg-bash-completion - 1.29.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-cnpg-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for kubectl-cnpg | https://github.com/cloudnative-pg/cloudnative-pg
- zypper - kubectl-cnpg-fish-completion - 1.29.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-cnpg-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish Completion for kubectl-cnpg | https://github.com/cloudnative-pg/cloudnative-pg
- zypper - kubectl-cnpg-zsh-completion - 1.29.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: kubectl-cnpg-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh Completion for kubectl-cnpg | https://github.com/cloudnative-pg/cloudnative-pg


## Combined YAML source

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