Back to Kubescape

Installation Guide

docs/installation.md

4.0.64.8 KB
Original Source

Installation Guide

This guide covers all the ways to install Kubescape on your system.

Table of Contents


Quick Install

bash
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash

This script:

  • Detects your OS and architecture (x86_64, ARM64/M1/M2)
  • Downloads the latest release
  • Installs to ~/.kubescape/
  • Adds to your PATH

Windows (PowerShell)

Requires PowerShell v5.0 or higher:

powershell
iwr -useb https://raw.githubusercontent.com/kubescape/kubescape/master/install.ps1 | iex

If you get an execution policy error:

powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Install a Specific Version

bash
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v3.0.0

Package Managers

Homebrew (macOS/Linux)

bash
brew install kubescape

Note: The official Homebrew formula has git scanning disabled. For full functionality:

bash
brew tap kubescape/tap
brew install kubescape-cli

Krew (kubectl plugin)

bash
kubectl krew update
kubectl krew install kubescape

# Use as kubectl plugin
kubectl kubescape scan

Ubuntu / Debian

bash
sudo add-apt-repository ppa:kubescape/kubescape
sudo apt update
sudo apt install kubescape

For other Debian-based or RPM-based distributions, see the OpenSUSE Build Service.

Arch Linux

bash
# Build from source
yay -S kubescape

# Or install pre-built binary (faster)
yay -S kubescape-bin

Note: AUR packages are community-supported.

openSUSE

bash
sudo zypper refresh
sudo zypper install kubescape

Note: Community-supported.

NixOS / Nix

bash
# Try in ephemeral shell
nix-shell -p kubescape

# Or add to configuration.nix
environment.systemPackages = with pkgs; [ kubescape ];

# Or with home-manager
home.packages = with pkgs; [ kubescape ];

Note: Community-supported. See NixOS support for issues.

Snap

bash
sudo snap install kubescape

Chocolatey (Windows)

powershell
choco install kubescape

Note: Community-supported.

Scoop (Windows)

powershell
scoop install kubescape

Note: Community-supported.


Manual Installation

Download from GitHub Releases

  1. Go to the Releases page
  2. Download the appropriate binary for your OS/architecture
  3. Make it executable and move to your PATH:
bash
# Linux/macOS example
chmod +x kubescape
sudo mv kubescape /usr/local/bin/

Build from Source

bash
git clone https://github.com/kubescape/kubescape.git
cd kubescape
make build

Verification

After installation, verify Kubescape is working:

bash
# Check version
kubescape version

# Run a simple scan (requires cluster access)
kubescape scan

# Or scan a sample file
kubescape scan https://raw.githubusercontent.com/kubernetes/examples/master/guestbook/all-in-one/guestbook-all-in-one.yaml

Expected Output

Kubescape version: vX.X.X

Updating

Script Installation

Re-run the install script to get the latest version:

bash
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash

Package Managers

Use your package manager's update command:

bash
# Homebrew
brew upgrade kubescape

# apt
sudo apt update && sudo apt upgrade kubescape

# Krew
kubectl krew upgrade kubescape

Uninstalling

Script Installation

bash
rm -rf ~/.kubescape
# Remove from PATH in your shell config (.bashrc, .zshrc, etc.)

Package Managers

Use your package manager's uninstall command:

bash
# Homebrew
brew uninstall kubescape

# apt
sudo apt remove kubescape

# Krew
kubectl krew uninstall kubescape

Next Steps