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) andbash
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 thekubescape
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 thekubectl
command-line tool. Kubescape can be installed as akubectl
plugin.
First,install Krew using the appropriate method for your platform. Then, install Kubescape:
To invoke Kubescape when installed with krew, usekubectl kubescape
instead ofkubescape
.
Windows
Supported platforms
Kubescape is supported on Windows x64.
PowerShell
Similar to thebash installation script, you can install Kubescape using PowerShell on Windows:
If you get an error message, you may need to change theexecution 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 iscommunity supported and may not always be up-to-date with thelatest 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 iscommunity supported and may not always be up-to-date with thelatest Kubescape release.
macOS
Homebrew
Kubescape is available in theofficial Homebrew repository or through aKubescape tap. The version from the official repository does not include support for scanning Git repositories, due toan upstream packaging issue.
To install Kubescape from the official repository:
To get Git support, install the Kubescape tap and thekubescape-cli
package:
Linux
Ubuntu
The Kubescape maintainers build each release and upload the packages to apersonal package archive (PPA).
To install Kubescape withapt
:
Kubescape can also be installed fromthe 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 inRPM
anddeb
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 thelatest Kubescape release.
Arch
Kubescape is available in theArch 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 installkubescape-bin
instead:
Note
Packaging for kubescape-bin is supported by theAUR community and may not always be up-to-date with thelatest Kubescape release.
NixOS, or using nix on Windows or Linux
You can usenix
on Linux or macOS.
To try it out in an ephemeral shell, runnix-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 usingHome Manager:
Or, to install your profile (not recommended):
Note
Packaging for Nix iscommunity supported and may not always be up-to-date with thelatest Kubescape release. If you are having trouble, please reach out toNixOS support.
Offline/air-gapped environment support
When it runs, Kubescape downloadsartifacts (frameworks, controls and configurations) from thecontrol library or from a configuredprovider.
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: