The StackRox Kubernetes Security Platform performs a risk analysis of the container environment, delivers visibility and runtime alerts, and provides recommenda
The StackRox Kubernetes Security Platform performs a risk analysis of the container environment, delivers visibility and runtime alerts, and provides recommenda
The StackRox Kubernetes Security Platform performs a risk analysis of the container environment, delivers visibility and runtime alerts, and provides recommendations to proactively improve security by hardening the environment. StackRox integrates with every stage of container lifecycle: build, deploy and runtime.
The StackRox Kubernetes Security platform is built on the foundation of the product formerly known as Prevent, which itself was called Mitigate and Apollo. You may find references to these previous names in code or documentation.
You can reach out to us through Slack (#stackrox). For alternative ways, stop by our Community Hub stackrox.io.
For event updates, blogs and other resources follow the StackRox community site at stackrox.io.
For the StackRox Code of Conduct.
To report a vulnerability or bug.
As of release 4.10 it's possible to install StackRox using the operator.
[!WARNING] The following installation methods are deprecated.
StackRox offers quick installation via Helm Charts. Follow the Helm Installation Guide to get helm CLI on your system.
Then run the helm quick installation script or proceed to section Manual Installation using Helm for configuration options.
Install StackRox via Helm Installation Script
…sh helm repo add stackrox https://raw.githubusercontent.com/stackrox/helm-charts/main/opensource/
To see all available Helm charts in the repo run (you may add the option `--devel` to show non-release builds as well)
```sh
helm search repo stackroxTo install stackrox-central-services, you will need a secure password. This password will be needed later for UI login and when creating an init bundle.
ROX_ADMIN_PASSWORD="$(openssl rand -base64 20 | tr -d '/=+')"From here, you can install stackrox-central-services to get Central and Scanner components deployed on your cluster.
Note: You need only one deployed instance of stackrox-central-services even if you plan to secure multiple clusters.
To perform the installation, choose one of the following commands depending on your cluster size.
If you're installing in a reasonably sized cluster, use the default installation command:
helm upgrade --install -n stackrox --create-namespace stackrox-central-services \
stackrox/stackrox-central-services \
--set central.adminPassword.value="${ROX_ADMIN_PASSWORD}" \
--set central.persistence.none="true"If you're installing in a single node cluster, or the default installation results in pods stuck pending due to lack of resources, use the following command instead to reduce stackrox-central-services resource requirements. Keep in mind that these reduced resource settings are not suited for a production setup.
helm upgrade --install -n stackrox --create-namespace stackrox-central-services \
stackrox/stackrox-central-services \
--set central.adminPassword.value="${ROX_ADMIN_PASSWORD}" \
--set central.persistence.none="true" \
--set central.resources.requests.memory=1Gi \
--set central.resources.requests.cpu=1 \
--set central.resources.limits.memory=4Gi \
--set central.resources.limits.cpu=1 \
--set central.db.resources.requests.memory=1Gi \
--set central.db.resources.requests.cpu=500m \
--set central.db.resources.limits.memory=4Gi \
--set central.db.resources.limits.cpu=1 \
--set scanner.autoscaling.disable=true \
--set scanner.replicas=1 \
--set scanner.resources.requests.memory=500Mi \
--set scanner.resources.requests.cpu=500m \
--set scanner.resources.limits.memory=2500Mi \
--set scanner.resources.limits.cpu=2000mInstall StackRox Secured Cluster Services
Next, the secured cluster component will need to be deployed to collect information on from the Kubernetes nodes.
Set a meaningful cluster name for your secured cluster in the CLUSTER_NAME shell variable. The cluster will be identified by this name in the clusters list of the StackRox UI.
CLUSTER_NAME="my-secured-cluster"Set the endpoint of Central the Secured Cluster Services should communicate to. If you're deploying stackrox-secured-cluster-services on the same cluster as stackrox-central-services, leave it as shown, otherwise change the value to the endpoint through which Central is accessible.
CENTRAL_ENDPOINT="central.stackrox.svc:443"Generate an init bundle containing initialization secrets. The init bundle will be saved in stackrox-init-bundle.yaml, and you will use it to provision secured clusters as shown below.
echo "$ROX_ADMIN_PASSWORD" | \
kubectl -n stackrox exec -i deploy/central -- bash -c 'ROX_ADMIN_PASSWORD=$(cat) roxctl --insecure-skip-tls-verify \
central init-bundles generate stackrox-init-bundle --output -' > stackrox-init-bundle.yamlThen install stackrox-secured-cluster-services (with the init bundle you just generated).
To perform the installation, choose one of the following commands depending on your cluster size.
If you're installing in a reasonably sized cluster, use the default installation command:
helm upgrade --install -n stackrox --create-namespace stackrox-secured-cluster-services \
stackrox/stackrox-secured-cluster-services \
-f stackrox-init-bundle.yaml \
--set clusterName="$CLUSTER_NAME" \
--set centralEndpoint="$CENTRAL_ENDPOINT"If you're installing in a single node cluster, or the default installation results in pods stuck pending due to lack of resources, use the following command instead to reduce stackrox-secured-cluster-services resource requirements. Keep in mind that these reduced resource settings are not suited for a production setup.
helm upgrade --install -n stackrox --create-namespace stackrox-secured-cluster-services \
stackrox/stackrox-secured-cluster-services \
-f stackrox-init-bundle.yaml \
--set clusterName="$CLUSTER_NAME" \
--set centralEndpoint="$CENTRAL_ENDPOINT" \
--set sensor.resources.requests.memory=500Mi \
--set sensor.resources.requests.cpu=500m \
--set sensor.resources.limits.memory=500Mi \
--set sensor.resources.limits.cpu=500m
…
git clone [email protected]:stackrox/stackrox.git
cd stackrox
MAIN_IMAGE_TAG=VERSION_TO_USE ./deploy/deploy.sh
…
git clone [email protected]:stackrox/stackrox.git
cd stackrox
MAIN_IMAGE_TAG=VERSION_TO_USE ./deploy/deploy.shAfter a few minutes, all resources should be deployed. The process will complete with this message.
Credentials for the 'admin' user can be found in the ./deploy/openshift/central-deploy/password file.
Note: While the password file is stored in plaintext on your local filesystem, the Kubernetes Secret StackRox uses is encrypted, and you will not be able to alter the secret at runtime. If you loose the password, you will have to redeploy central.
Click to Expand
Run the following in your working directory of choice:
git clone [email protected]:stackrox/stackrox.git
cd stackrox
MAIN_IMAGE_TAG=latest ./deploy/deploy-local.shAfter a few minutes, all resources should be deployed.
Credentials for the 'admin' user can be found in the ./deploy/k8s/deploy-local/password file.
Click to expand
After the deployment has completed (operator, Helm or script install) a port-forward should exist, so you can connect to https://localhost:8000/. Run the following
kubectl port-forward -n 'stackrox' svc/central "8000:443"
…
bash
xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools
sudo xcode-select -s /Applications/Xcode.app/Contents/DeveloperFor more info, see
Click to expand
# Create a GOPATH: this is the location of your Go "workspace".
# (Note that it is not – and must not – be the same as the path Go is installed to.)
# The default is to have it in ~/go/, or ~/development, but anything you prefer goes.
# Whatever you decide, create the directory, set GOPATH, and update PATH:
export GOPATH=$HOME/go # Change this if you choose to use a different workspace.
export PATH=$PATH:$GOPATH/bin
# You probably want to permanently set these by adding the following commands to your shell
# configuration (e.g. ~/.bash_profile)
cd $GOPATH
mkdir -p bin pkg
mkdir -p src/github.com/stackrox
cd src/github.com/stackrox
git clone [email protected]:stackrox/stackrox.gitClick to expand
To sweeten your experience, install the workflow scripts beforehand.
$ cd $GOPATH/src/github.com/stackrox/stackrox
$ make install-dev-tools
$ make image
…
bash
# To keep the StackRox Central's Postgres DB state between database upgrades and restarts, set:
$ export STORAGE=pvc
# To save time on rebuilds by skipping UI builds, set:
$ export SKIP_UI_BUILD=1
# To save time on rebuilds by skipping CLI builds, set:
$ export SKIP_CLI_BUILD=1
# When you deploy locally make sure your kube context points to the desired kubernetes cluster,
# for example Docker Desktop.
# To check the current context you can call a workflow script:
$ roxkubectx
# To deploy locally, call:
$ ./deploy/deploy-local.sh
# Now you can access StackRox dashboard at https://localhost:8000
# or simply call another workflow script:
$ logmeinSee Installation via Scripts for further reading. To read more about the environment variables, consult deploy/README.md.
Click to expand
# Build image, this will create `stackrox/main` with a tag defined by `make tag`.
$ make image
# Compile all binaries
$ make main-build-dockerized
# DisplayNo open issues yet, or sync has not completed.