Installing Kubescape
The Kubescape command-line client is a single binary. Because the software is updated frequently, we recommend you install Kubescape with the package manager appropriate for your system.
When Kubescape runs, it will check for a more recent version.
Cross-platform
Script install
Supported platforms
This script is supported on Linux (x86_64 and arm64), macOS (Intel or Apple Silicon) and bash
on Windows (x86_64).
You can automatically download and install Kubescape using our installer script. We encourage you to read it before executing it.
If run as root, the script will install the kubescape
binary in /usr/local/bin
. If run as a user, it will put the binary in /.kubescape/bin
.
krew
Krew is the plugin manager for the kubectl
command-line tool. Kubescape can be installed as a kubectl
plugin.
First, install Krew using the appropriate method for your platform. Then, install Kubescape:
To invoke Kubescape when installed with krew, use kubectl kubescape
instead of kubescape
.
Windows
Supported platforms
Kubescape is supported on Windows x64.
PowerShell
Similar to the bash installation script, you can install Kubescape using PowerShell on Windows:
If you get an error message, you may need to change the execution policy:
Note
The installation script requires PowerShell v5.0 or higher.
Chocolatey
Chocolatey is a package manager for Windows. To install Kubescape using Chocolatey, open a PowerShell terminal and run:
Note
Packaging for Chocolatey is community supported and may not always be up-to-date with the latest Kubescape release.
Scoop
Scoop is a command-line installer for Windows. To install Kubescape using Scoop, open a PowerShell terminal and run:
Note
Packaging for Scoop is community supported and may not always be up-to-date with the latest Kubescape release.
macOS
Homebrew
Kubescape is available in the official Homebrew repository or through a Kubescape tap. The version from the official repository does not include support for scanning Git repositories, due to an upstream packaging issue.
To install Kubescape from the official repository:
To get Git support, install the Kubescape tap and the kubescape-cli
package:
Linux
Ubuntu
The Kubescape maintainers build each release and upload the packages to a personal package archive (PPA).
To install Kubescape with apt
:
Kubescape can also be installed from the Snap Store.
Red Hat, CentOS, Fedora and other RPM-based distributions, and Debian
The Kubescape maintainers build each release and upload the packages to the openSUSE Build Service (OBS), which builds packages in RPM
and deb
format for many different distributions and platforms.
Installation instructions for each distribution are available on the OBS page.
openSUSE
Kubescape is packaged for the Zypper package manager.
Note
Packaging for openSUSE is supported by the openSUSE community and may not always be up-to-date with the latest Kubescape release.
Arch
Kubescape is available in the Arch Linux User Repository (AUR). To download and compile Kubescape on Arch Linux:
If you would like to save some time and do not want to compile, you can install kubescape-bin
instead:
Note
Packaging for kubescape-bin is supported by the AUR community and may not always be up-to-date with the latest Kubescape release.
NixOS, or using nix on Windows or Linux
You can use nix
on Linux or macOS.
To try it out in an ephemeral shell, run nix-shell -p kubescape
.
To install Kubescape on NixOS, add the following configuration to your /etc/nixos/configuration.nix
file:
# your other config ...
environment.systemPackages = with pkgs; [
# your other packages ...
kubescape
];
Alternatively, if using Home Manager:
Or, to install your profile (not recommended):
Note
Packaging for Nix is community supported and may not always be up-to-date with the latest Kubescape release. If you are having trouble, please reach out to NixOS support.
Offline/air-gapped environment support
When it runs, Kubescape downloads artifacts (frameworks, controls and configurations) from the control library or from a configured provider.
You can download these files manually, so that Kubescape can run offline, or in an "air-gapped" environment.
Download all artifacts
-
Download the controls and save them in the local directory. If no path is specified, they will be saved in
~/.kubescape
. -
Copy the downloaded artifacts to the offline system.
-
Scan using the downloaded artifacts:
Download a single artifact
You can also download a single artifact, and scan with the --use-from
flag:
-
Download and save in a file. If no file name is specified, the artifact will be saved as
~/.kubescape/<framework name>.json
. -
Copy the downloaded artifacts to the offline system.
-
Scan using the downloaded framework: