Installation Methods
Install via Homebrew
Section titled “Install via Homebrew”The Kyverno CLI can also be installed with Homebrew as a formula.
brew install kyvernoInstall via Krew
Section titled “Install via Krew”You can use Krew to install the Kyverno CLI:
# Install Kyverno CLI using kubectl krew plugin managerkubectl krew install kyverno
# test the Kyverno CLIkubectl kyverno versionInstall via AUR (archlinux)
Section titled “Install via AUR (archlinux)”You can install the Kyverno CLI via your favorite AUR helper (e.g. yay)
yay -S kyverno-gitInstall in GitHub Actions
Section titled “Install in GitHub Actions”The Kyverno CLI can be installed in GitHub Actions using kyverno-cli-installer from the GitHub Marketplace. Please refer to kyverno-cli-installer for more information.
Manual Binary Installation
Section titled “Manual Binary Installation”The Kyverno CLI may also be installed by manually downloading the compiled binary available on the releases page. An example of installing the Kyverno CLI v1.12.0 on a Linux x86_64 system is shown below.
curl -LO https://github.com/kyverno/kyverno/releases/download/v1.12.0/kyverno-cli_v1.12.0_linux_x86_64.tar.gztar -xvf kyverno-cli_v1.12.0_linux_x86_64.tar.gzsudo cp kyverno /usr/local/bin/Building the CLI from source
Section titled “Building the CLI from source”You can also build the CLI binary from the Git repository (requires Go).
git clone https://github.com/kyverno/kyvernocd kyvernomake build-clisudo mv ./cmd/cli/kubectl-kyverno/kubectl-kyverno /usr/local/bin/