Movatterモバイル変換


[0]ホーム

URL:


Skip to content

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.

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

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:

kubectlkrewupdatekubectlkrewinstallkubescape

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:

iwr-usebhttps://raw.githubusercontent.com/kubescape/kubescape/master/install.ps1|iex

If you get an error message, you may need to change theexecution policy:

Set-ExecutionPolicyRemoteSigned-scopeCurrentUser

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:

chocoinstallkubescape

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:

scoopinstallkubescape

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:

brewinstallkubescape

To get Git support, install the Kubescape tap and thekubescape-cli package:

brewtapkubescape/tapbrewinstallkubescape-cli

Linux

Ubuntu

The Kubescape maintainers build each release and upload the packages to apersonal package archive (PPA).

To install Kubescape withapt:

sudoadd-apt-repositoryppa:kubescape/kubescapesudoaptupdatesudoaptinstallkubescape

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.

sudozypperrefreshsudozypperinstallkubescape

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:

yay-Skubescape

If you would like to save some time and do not want to compile, you can installkubescape-bin instead:

yay-Skubescape-bin

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:

  # your other config ...  home.packages = with pkgs; [    # your other packages ...    kubescape  ];

Or, to install your profile (not recommended):

nix-env--install-Anixpkgs.kubescape

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

  1. Download the controls and save them in the local directory. If no path is specified, they will be saved in~/.kubescape.

    kubescapedownloadartifacts--outputpath/to/local/dir
  2. Copy the downloaded artifacts to the offline system.

  3. Scan using the downloaded artifacts:

    kubescapescan--use-artifacts-frompath/to/local/dir

Download a single artifact

You can also download a single artifact, and scan with the--use-from flag:

  1. Download and save in a file. If no file name is specified, the artifact will be saved as~/.kubescape/<framework name>.json.

    kubescapedownloadframeworknsa--output/path/nsa.json
  2. Copy the downloaded artifacts to the offline system.

  3. Scan using the downloaded framework:

    kubescapescanframeworknsa--use-from/path/nsa.json

Next steps


[8]ページ先頭

©2009-2025 Movatter.jp