Este conteúdo não está disponível no idioma selecionado.
Chapter 3. Installing RHACS on other platforms
3.1. High-level overview of installing RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
Red Hat Advanced Cluster Security for Kubernetes (RHACS) provides security services for self-managed RHACS on platforms such as Amazon Elastic Kubernetes Service (Amazon EKS), Google Kubernetes Engine (Google GKE), and Microsoft Azure Kubernetes Service (Microsoft AKS).
Before you install:
- Understand the installation platforms and methods.
- Understand Red Hat Advanced Cluster Security for Kubernetes architecture.
- Review the prerequisites.
The following list provides a high-level overview of installation steps:
-
Install Central services on a cluster using Helm charts or the
roxctlCLI. - Generate and apply an init bundle.
- Install secured cluster resources on each of your secured clusters.
3.2. Prerequisites for RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
Before installing RHACS on other platforms such as Amazon Elastic Kubernetes Service (Amazon EKS), Google Kubernetes Engine (Google GKE), and Microsoft Azure Kubernetes Service (Microsoft AKS), ensure that you have met the prerequisites.
3.2.1. General requirements Copiar o linkLink copiado para a área de transferência!
RHACS has some system requirements that must be met before installing.
You must not install Red Hat Advanced Cluster Security for Kubernetes on:
- Amazon Elastic File System (Amazon EFS). Use the Amazon Elastic Block Store (Amazon EBS) with the default gp2 volume type instead.
- Older CPUs that do not have the Streaming SIMD Extensions (SSE) 4.2 instruction set. For example, Intel processors older than Sandy Bridge and AMD processors older than Bulldozer. (These processors were released in 2011.)
To install Red Hat Advanced Cluster Security for Kubernetes, you must have:
- OpenShift Container Platform version 4.10 or later. For more information about supported self-managed and managed OpenShift Container Platform versions, see Red Hat Advanced Cluster Security for Kubernetes Support Policy.
Cluster nodes with a supported operating system:
- Red Hat Enterprise Linux CoreOS (RHCOS), Red Hat Enterprise Linux (RHEL).
- A supported managed Kubernetes platform. For more information, see Red Hat Advanced Cluster Security for Kubernetes Support Policy.
Cluster nodes with a supported operating system:
- Operating system: Amazon Linux, CentOS, Container-Optimized OS from Google, Red Hat Enterprise Linux CoreOS (RHCOS), Debian, Red Hat Enterprise Linux (RHEL), or Ubuntu.
Processor and memory: 2 CPU cores and at least 3GiB of RAM.
NoteFor deploying Central, use a machine type with four or more cores and apply scheduling policies to launch Central on such nodes.
Architectures: AMD64, ppc64le, or s390x.
NoteFor ppc64le, or s390x architectures, you can only install RHACS Secured cluster services on IBM Power, IBM zSystems, and IBM® LinuxONE clusters. Central is not supported at this time.
Persistent storage by using persistent volume claim (PVC).
ImportantYou must not use Ceph FS storage with Red Hat Advanced Cluster Security for Kubernetes. Red Hat recommends using RBD block mode PVCs for Red Hat Advanced Cluster Security for Kubernetes.
- Use Solid-State Drives (SSDs) for best performance. However, you can use another storage type if you do not have SSDs available.
To install using Helm charts:
-
You must have Helm command-line interface (CLI) v3.2 or newer, if you are installing or configuring Red Hat Advanced Cluster Security for Kubernetes using Helm charts. Use the
helm versioncommand to verify the version of Helm you have installed. -
The Red Hat OpenShift CLI (
oc). -
You must have access to the Red Hat Container Registry. For information about downloading images from
registry.redhat.io, see Red Hat Container Registry Authentication.
3.2.2. Prerequisites for installing Central Copiar o linkLink copiado para a área de transferência!
A containerized service called Central handles API interactions and user interface (Portal) access while a containerized service called Central DB (PostgreSQL 13) handles data persistence.
Both Central and Central DB require persistent storage:
You can provide storage with a persistent volume claim (PVC).
NoteYou can use a hostPath volume for storage only if all your hosts (or a group of hosts) mount a shared file system, such as an NFS share or a storage appliance. Otherwise, your data is only saved on a single node. Red Hat does not recommend using a hostPath volume.
- Use Solid-State Drives (SSD) for best performance. However, you can use another storage type if you do not have SSDs available.
If you use a web proxy or firewall, you must configure bypass rules to allow traffic for the
definitions.stackrox.ioandcollector-modules.stackrox.iodomains and enable Red Hat Advanced Cluster Security for Kubernetes to trust your web proxy or firewall. Otherwise, updates for vulnerability definitions and kernel support packages will fail.Red Hat Advanced Cluster Security for Kubernetes requires access to:
-
definitions.stackrox.iofor downloading updated vulnerability definitions. Vulnerability definition updates allow Red Hat Advanced Cluster Security for Kubernetes to maintain up-to-date vulnerability data when new vulnerabilities are discovered or additional data sources are added. -
collector-modules.stackrox.ioto download updated kernel support packages. Updated Kernel support packages ensure that Red Hat Advanced Cluster Security for Kubernetes can monitor the latest operating systems and collect data about the network traffic and processes running inside the containers. Without these updates, Red Hat Advanced Cluster Security for Kubernetes might fail to monitor containers if you add new nodes in your cluster or if you update your nodes' operating system.
-
For security reasons, you should deploy Central in a cluster with limited administrative access.
Memory and storage requirements
The following table lists the minimum memory and storage values required to install and run Central.
| Central | CPU | Memory | Storage |
|---|---|---|---|
| Request | 1.5 cores | 4 GiB | 100 GiB |
| Limit | 4 cores | 8 GiB | 100 GiB |
| Central DB | CPU | Memory | Storage |
|---|---|---|---|
| Request | 4 cores | 8 GiB | 100 GiB |
| Limit | 8 cores | 16 GiB | 100 GiB |
Sizing guidelines
Use the following compute resources and storage values depending upon the number of nodes in your cluster.
| Nodes | Deployments | Central CPU | Central Memory | Central Storage |
|---|---|---|---|---|
| Up to 100 | Up to 1000 | 2 cores | 4 GiB | 100 GiB |
| Up to 500 | Up to 2000 | 4 cores | 8 GiB | 100 GiB |
| More than 500 | More than 2000 | 8 cores | 12 - 16 GiB | 100 - 200 GiB |
| Nodes | Deployments | Central DB CPU | Central DB Memory | Central DB Storage |
|---|---|---|---|---|
| Up to 100 | Up to 1000 | 2 cores | 4 GiB | 100 GiB |
| Up to 500 | Up to 2000 | 4 cores | 8 GiB | 100 GiB |
| More than 500 | More than 2000 | 8 cores | 12 - 16 GiB | 100 - 200 GiB |
3.2.3. Prerequisites for installing Scanner Copiar o linkLink copiado para a área de transferência!
Red Hat Advanced Cluster Security for Kubernetes includes an image vulnerability scanner called Scanner. This service scans images that are not already scanned by scanners integrated into image registries.
Memory and storage requirements
| Scanner | CPU | Memory |
|---|---|---|
| Request | 1.2 cores | 2700 MiB |
| Limit | 5 cores | 8000 MiB |
3.2.4. Prerequisites for installing Sensor Copiar o linkLink copiado para a área de transferência!
Sensor monitors your Kubernetes and OpenShift Container Platform clusters. These services currently deploy in a single deployment, which handles interactions with the Kubernetes API and coordinates with Collector.
Memory and storage requirements
| Sensor | CPU | Memory |
|---|---|---|
| Request | 2 cores | 4 GiB |
| Limit | 4 cores | 8 GiB |
3.2.5. Prerequisites for installing Admission controller Copiar o linkLink copiado para a área de transferência!
The Admission controller prevents users from creating workloads that violate policies you configure.
Memory and storage requirements
By default, the admission control service runs 3 replicas. The following table lists the request and limits for each replica.
| Admission controller | CPU | Memory |
|---|---|---|
| Request | .05 cores | 100 MiB |
| Limit | .5 cores | 500 MiB |
3.2.6. Prerequisites for installing Collector Copiar o linkLink copiado para a área de transferência!
Collector monitors runtime activity on each node in your secured clusters. It connects to Sensor to report this information.
To install Collector on systems that have Unified Extensible Firmware Interface (UEFI) and that have Secure Boot enabled, you must use eBPF probes because kernel modules are unsigned, and the UEFI firmware cannot load unsigned packages. Collector identifies Secure Boot status at the start and switches to eBPF probes if required.
Memory and storage requirements
| Collector | CPU | Memory |
|---|---|---|
| Request | .05 cores | 320 MiB |
| Limit | .75 cores | 1 GiB |
Collector uses a mutable image tag (<version>-latest), so you get support for newer Linux kernel versions more easily. There is no change in code, pre-existing kernel modules, or eBPF programs for image updates. Updates only add a single image layer with support for new kernel versions published after the initial release.
3.3. Installing Central services for RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
Central is the resource that contains the RHACS application management interface and services. It handles data persistence, API interactions, and RHACS portal access. You can use the same Central instance to secure multiple OpenShift Container Platform or Kubernetes clusters.
You can install Central by using one of the following methods:
- Install using Helm charts
-
Install using the
roxctlCLI (do not use this method unless you have a specific installation need that requires using it)
3.3.1. Install Central using Helm charts Copiar o linkLink copiado para a área de transferência!
You can install Central using Helm charts without any customization, using the default values, or by using Helm charts with additional customizations of configuration parameters.
3.3.1.1. Install Central using Helm charts without customization Copiar o linkLink copiado para a área de transferência!
You can install RHACS on your Red Hat OpenShift cluster without any customizations. You must add the Helm chart repository and install the central-services Helm chart to install the centralized components of Central and Scanner.
3.3.1.1.1. Adding the Helm chart repository Copiar o linkLink copiado para a área de transferência!
Procedure
Add the RHACS charts repository.
helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/
$ helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The Helm repository for Red Hat Advanced Cluster Security for Kubernetes includes Helm charts for installing different components, including:
Central services Helm chart (
central-services) for installing the centralized components (Central and Scanner).NoteYou deploy centralized components only once and you can monitor multiple separate clusters by using the same installation.
Secured Cluster Services Helm chart (
secured-cluster-services) for installing the per-cluster (Sensor and Admission controller) and per-node (Collector) components.NoteDeploy the per-cluster components into each cluster that you want to monitor and deploy the per-node components in all nodes that you want to monitor.
Verification
Run the following command to verify the added chart repository:
helm search repo -l rhacs/
$ helm search repo -l rhacs/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.1.1.2. Installing the central-services Helm chart without customizations Copiar o linkLink copiado para a área de transferência!
Use the following instructions to install the central-services Helm chart to deploy the centralized components (Central and Scanner).
Prerequisites
-
You must have access to the Red Hat Container Registry. For information about downloading images from
registry.redhat.io, see Red Hat Container Registry Authentication.
Procedure
Run the following command to install Central services and expose Central using a route:
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password> \ --set central.exposure.route.enabled=true
$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password> \ --set central.exposure.route.enabled=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Or, run the following command to install Central services and expose Central using a load balancer:
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password> \ --set central.exposure.loadBalancer.enabled=true
$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password> \ --set central.exposure.loadBalancer.enabled=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Or, run the following command to install Central services and expose Central using port forward:
helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password>$ helm install -n stackrox \ --create-namespace stackrox-central-services rhacs/central-services \ --set imagePullSecrets.username=<username> \ --set imagePullSecrets.password=<password>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If you are installing Red Hat Advanced Cluster Security for Kubernetes in a cluster that requires a proxy to connect to external services, you must specify your proxy configuration by using the
proxyConfigparameter. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
If you already created one or more image pull secrets in the namespace in which you are installing, instead of using a username and password, you can use
--set imagePullSecrets.useExisting="<pull-secret-1;pull-secret-2>". Do not use image pull secrets:
-
If you are pulling your images from
quay.io/stackrox-ioor a registry in a private network that does not require authentication. Use use--set imagePullSecrets.allowNone=trueinstead of specifying a username and password. -
If you already configured image pull secrets in the default service account in the namespace you are installing. Use
--set imagePullSecrets.useFromDefaultServiceAccount=trueinstead of specifying a username and password.
-
If you are pulling your images from
The output of the installation command includes:
- An automatically generated administrator password.
- Instructions on storing all the configuration values.
- Any warnings that Helm generates.
3.3.1.2. Install Central using Helm charts with customizations Copiar o linkLink copiado para a área de transferência!
You can install RHACS on your Red Hat OpenShift cluster with customizations by using Helm chart configuration parameters with the helm install and helm upgrade commands. You can specify these parameters by using the --set option or by creating YAML configuration files.
Create the following files for configuring the Helm chart for installing Red Hat Advanced Cluster Security for Kubernetes:
-
Public configuration file
values-public.yaml: Use this file to save all non-sensitive configuration options. -
Private configuration file
values-private.yaml: Use this file to save all sensitive configuration options. Ensure that you store this file securely.
3.3.1.2.1. Private configuration file Copiar o linkLink copiado para a área de transferência!
This section lists the configurable parameters of the values-private.yaml file. There are no default values for these parameters.
3.3.1.2.1.1. Image pull secrets Copiar o linkLink copiado para a área de transferência!
The credentials that are required for pulling images from the registry depend on the following factors:
If you are using a custom registry, you must specify these parameters:
-
imagePullSecrets.username -
imagePullSecrets.password -
image.registry
-
If you do not use a username and password to log in to the custom registry, you must specify one of the following parameters:
-
imagePullSecrets.allowNone -
imagePullSecrets.useExisting -
imagePullSecrets.useFromDefaultServiceAccount
-
| Parameter | Description |
|---|---|
|
| The username of the account that is used to log in to the registry. |
|
| The password of the account that is used to log in to the registry. |
|
|
Use |
|
|
A comma-separated list of secrets as values. For example, |
|
|
Use |
3.3.1.2.1.2. Proxy configuration Copiar o linkLink copiado para a área de transferência!
If you are installing Red Hat Advanced Cluster Security for Kubernetes in a cluster that requires a proxy to connect to external services, you must specify your proxy configuration by using the proxyConfig parameter. For example:
| Parameter | Description |
|---|---|
|
| Your proxy configuration. |
3.3.1.2.1.3. Central Copiar o linkLink copiado para a área de transferência!
Configurable parameters for Central.
For a new installation, you can skip the following parameters:
-
central.jwtSigner.key -
central.serviceTLS.cert -
central.serviceTLS.key -
central.adminPassword.value -
central.adminPassword.htpasswd -
central.db.serviceTLS.cert -
central.db.serviceTLS.key -
central.db.password.value - When you do not specify values for these parameters the Helm chart autogenerates values for them.
-
If you want to modify these values you can use the
helm upgradecommand and specify the values using the--setoption.
For setting the administrator password, you can only use either central.adminPassword.value or central.adminPassword.htpasswd, but not both.
| Parameter | Description |
|---|---|
|
| A private key which Red Hat Advanced Cluster Security for Kubernetes should use for signing JSON web tokens (JWTs) for authentication. |
|
| An internal certificate that the Central service should use for deploying Central. |
|
| The private key of the internal certificate that the Central service should use. |
|
| The user-facing certificate that Central should use. Red Hat Advanced Cluster Security for Kubernetes uses this certificate for RHACS portal.
|
|
| The private key of the user-facing certificate that Central should use.
|
|
| Connection password for Central database. |
|
| Administrator password for logging into Red Hat Advanced Cluster Security for Kubernetes. |
|
| Administrator password for logging into Red Hat Advanced Cluster Security for Kubernetes. This password is stored in hashed format using bcrypt. |
|
| An internal certificate that the Central DB service should use for deploying Central DB. |
|
| The private key of the internal certificate that the Central DB service should use. |
|
| The password used to connect to the Central DB. |
If you are using central.adminPassword.htpasswd parameter, you must use a bcrypt encoded password hash. You can run the command htpasswd -nB admin to generate a password hash. For example,
htpasswd: | admin:<bcrypt-hash>
htpasswd: |
admin:<bcrypt-hash>
3.3.1.2.1.4. Scanner Copiar o linkLink copiado para a área de transferência!
Configurable parameters for Scanner.
For a new installation, you can skip the following parameters and the Helm chart autogenerates values for them. Otherwise, if you are upgrading to a new version, specify the values for the following parameters:
-
scanner.dbPassword.value -
scanner.serviceTLS.cert -
scanner.serviceTLS.key -
scanner.dbServiceTLS.cert -
scanner.dbServiceTLS.key
| Parameter | Description |
|---|---|
|
| The password to use for authentication with Scanner database. Do not modify this parameter because Red Hat Advanced Cluster Security for Kubernetes automatically creates and uses its value internally. |
|
| An internal certificate that the Scanner service should use for deploying Scanner. |
|
| The private key of the internal certificate that the Scanner service should use. |
|
| An internal certificate that the Scanner-db service should use for deploying Scanner database. |
|
| The private key of the internal certificate that the Scanner-db service should use. |
3.3.1.2.2. Public configuration file Copiar o linkLink copiado para a área de transferência!
This section lists the configurable parameters of the values-public.yaml file.
3.3.1.2.2.1. Image pull secrets Copiar o linkLink copiado para a área de transferência!
Image pull secrets are the credentials required for pulling images from your registry.
| Parameter | Description |
|---|---|
|
|
Use |
|
|
A comma-seprated list of secrets as values. For example, |
|
|
Use |
3.3.1.2.2.2. Image Copiar o linkLink copiado para a área de transferência!
Image declares the configuration to set up the main registry, which the Helm chart uses to resolve images for the central.image, scanner.image, and scanner.dbImage parameters.
| Parameter | Description |
|---|---|
|
|
Address of your image registry. Either use a hostname, such as |
3.3.1.2.2.3. Environment variables Copiar o linkLink copiado para a área de transferência!
Red Hat Advanced Cluster Security for Kubernetes automatically detects your cluster environment and sets values for env.openshift, env.istio, and env.platform. Only set these values to override the automatic cluster environment detection.
| Parameter | Description |
|---|---|
|
|
Use |
|
|
Use |
|
|
The platform on which you are installing Red Hat Advanced Cluster Security for Kubernetes. Set its value to |
|
|
Use |
3.3.1.2.2.4. Additional trusted certificate authorities Copiar o linkLink copiado para a área de transferência!
The Red Hat Advanced Cluster Security for Kubernetes automatically references the system root certificates to trust. When Central or Scanner must reach out to services that use certificates issued by an authority in your organization or a globally trusted partner organization, you can add trust for these services by specifying the root certificate authority to trust by using the following parameter:
| Parameter | Description |
|---|---|
|
| Specify the PEM encoded certificate of the root certificate authority to trust. |
3.3.1.2.2.5. Central Copiar o linkLink copiado para a área de transferência!
Configurable parameters for Central.
-
You must specify a persistent storage option as either
hostPathorpersistentVolumeClaim. -
For exposing Central deployment for external access. You must specify one parameter, either
central.exposure.loadBalancer,central.exposure.nodePort, orcentral.exposure.route. When you do not specify any value for these parameters, you must manually expose Central or access it by using port-forwarding.
The following table includes settings for an external PostgreSQL database (Technology Preview).
External PostgreSQL support is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
| Parameter | Description |
|---|---|
|
| The endpoint configuration options for Central. |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Central. This parameter is mainly used for infrastructure nodes. |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Central. This parameter is mainly used for infrastructure nodes. |
|
|
Specify |
|
|
A custom registry that overrides the global |
|
|
The custom image name that overrides the default Central image name ( |
|
|
The custom image tag that overrides the default tag for Central image. If you specify your own image tag during a new installation, you must manually increment this tag when you to upgrade to a new version by running the |
|
|
Full reference including registry address, image name, and image tag for the Central image. Setting a value for this parameter overrides the |
|
| The memory request for Central to override the default value. |
|
| The CPU request for Central to override the default value. |
|
| The memory limit for Central to override the default value. |
|
| The CPU limit for Central to override the default value. |
|
| The path on the node where RHACS should create a database volume. Red Hat does not recommend using this option. |
|
| The name of the persistent volume claim (PVC) you are using. |
|
|
Use |
|
| The size (in GiB) of the persistent volume managed by the specified claim. |
|
|
Use |
|
| The port number on which to expose Central. The default port number is 443. |
|
|
Use |
|
| The port number on which to expose Central. When you skip this parameter, OpenShift Container Platform automatically assigns a port number. Red Hat recommends that you do not specify a port number if you are exposing Red Hat Advanced Cluster Security for Kubernetes by using a node port. |
|
|
Use |
|
|
(Technology Preview) Use |
|
|
(Technology Preview) The connection string for Central to use to connect to the database. This is only used when
|
|
| The minimum number of connections to the database to be established. |
|
| The maximum number of connections to the database to be established. |
|
| The number of milliseconds a single query or transaction can be active against the database. |
|
| The postgresql.conf to be used for Central DB as described in the PostgreSQL documentation in "Additional resources". |
|
| The pg_hba.conf to be used for Central DB as described in the PostgreSQL documentation in "Additional resources". |
|
|
Specify a node selector label as |
|
|
A custom registry that overrides the global |
|
|
The custom image name that overrides the default Central DB image name ( |
|
|
The custom image tag that overrides the default tag for Central DB image. If you specify your own image tag during a new installation, you must manually increment this tag when you to upgrade to a new version by running the |
|
|
Full reference including registry address, image name, and image tag for the Central DB image. Setting a value for this parameter overrides the |
|
| The memory request for Central DB to override the default value. |
|
| The CPU request for Central DB to override the default value. |
|
| The memory limit for Central DB to override the default value. |
|
| The CPU limit for Central DB to override the default value. |
|
| The path on the node where RHACS should create a database volume. Red Hat does not recommend using this option. |
|
| The name of the persistent volume claim (PVC) you are using. |
|
|
Use |
|
| The size (in GiB) of the persistent volume managed by the specified claim. |
3.3.1.2.2.6. Scanner Copiar o linkLink copiado para a área de transferência!
Configurable parameters for Scanner.
| Parameter | Description |
|---|---|
|
|
Use |
|
|
Specify |
|
|
The number of replicas to create for the Scanner deployment. When you use it with the |
|
|
Configure the log level for Scanner. Red Hat recommends that you not change the log level’s default value ( |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Scanner. This parameter is mainly used for infrastructure nodes. |
|
|
Use |
|
| The minimum number of replicas for autoscaling. |
|
| The maximum number of replicas for autoscaling. |
|
| The memory request for Scanner to override the default value. |
|
| The CPU request for Scanner to override the default value. |
|
| The memory limit for Scanner to override the default value. |
|
| The CPU limit for Scanner to override the default value. |
|
| The memory request for Scanner database deployment to override the default values. |
|
| The CPU request for Scanner database deployment to override the default values. |
|
| The memory limit for Scanner database deployment to override the default values. |
|
| The CPU limit for Scanner database deployment to override the default values. |
|
| A custom registry for the Scanner image. |
|
|
The custom image name that overrides the default Scanner image name ( |
|
| A custom registry for the Scanner DB image. |
|
|
The custom image name that overrides the default Scanner DB image name ( |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Scanner DB. This parameter is mainly used for infrastructure nodes. |
3.3.1.2.2.7. Customization Copiar o linkLink copiado para a área de transferência!
Use these parameters to specify additional attributes for all objects that Red Hat Advanced Cluster Security for Kubernetes creates.
| Parameter | Description |
|---|---|
|
| A custom label to attach to all objects. |
|
| A custom annotation to attach to all objects. |
|
| A custom label to attach to all deployments. |
|
| A custom annotation to attach to all deployments. |
|
| A custom environment variable for all containers in all objects. |
|
| A custom label to attach to all objects that Central creates. |
|
| A custom annotation to attach to all objects that Central creates. |
|
| A custom label to attach to all Central deployments. |
|
| A custom annotation to attach to all Central deployments. |
|
| A custom environment variable for all Central containers. |
|
| A custom label to attach to all objects that Scanner creates. |
|
| A custom annotation to attach to all objects that Scanner creates. |
|
| A custom label to attach to all Scanner deployments. |
|
| A custom annotation to attach to all Scanner deployments. |
|
| A custom environment variable for all Scanner containers. |
|
| A custom label to attach to all objects that Scanner DB creates. |
|
| A custom annotation to attach to all objects that Scanner DB creates. |
|
| A custom label to attach to all Scanner DB deployments. |
|
| A custom annotation to attach to all Scanner DB deployments. |
|
| A custom environment variable for all Scanner DB containers. |
You can also use:
-
the
customize.other.service/*.labelsand thecustomize.other.service/*.annotationsparameters, to specify labels and annotations for all objects. -
or, provide a specific service name, for example,
customize.other.service/central-loadbalancer.labelsandcustomize.other.service/central-loadbalancer.annotationsas parameters and set their value.
3.3.1.2.2.8. Advanced customization Copiar o linkLink copiado para a área de transferência!
The parameters specified in this section are for information only. Red Hat does not support Red Hat Advanced Cluster Security for Kubernetes instances with modified namespace and release names.
| Parameter | Description |
|---|---|
|
|
Use |
|
|
Use |
3.3.1.2.3. Installing the central-services Helm chart Copiar o linkLink copiado para a área de transferência!
After you configure the values-public.yaml and values-private.yaml files, install the central-services Helm chart to deploy the centralized components (Central and Scanner).
Procedure
Run the following command:
helm install -n stackrox --create-namespace \ stackrox-central-services rhacs/central-services \ -f <path_to_values_public.yaml> -f <path_to_values_private.yaml>
$ helm install -n stackrox --create-namespace \ stackrox-central-services rhacs/central-services \ -f <path_to_values_public.yaml> -f <path_to_values_private.yaml>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Use the
-foption to specify the paths for your YAML configuration files.
3.3.1.3. Changing configuration options after deploying the central-services Helm chart Copiar o linkLink copiado para a área de transferência!
You can make changes to any configuration options after you have deployed the central-services Helm chart.
Procedure
-
Update the
values-public.yamlandvalues-private.yamlconfiguration files with new values. Run the
helm upgradecommand and specify the configuration files using the-foption:helm upgrade -n stackrox \ stackrox-central-services rhacs/central-services \ -f <path_to_values_public.yaml> \ -f <path_to_values_private.yaml>
$ helm upgrade -n stackrox \ stackrox-central-services rhacs/central-services \ -f <path_to_values_public.yaml> \ -f <path_to_values_private.yaml>Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can also specify configuration values using the
--setor--set-fileparameters. However, these options are not saved, and it requires you to manually specify all the options again whenever you make changes.
3.3.2. Install Central using the roxctl CLI Copiar o linkLink copiado para a área de transferência!
For production environments, Red Hat recommends using the Operator or Helm charts to install RHACS. Do not use the roxctl install method unless you have a specific installation need that requires using this method.
3.3.2.1. Installing the roxctl CLI Copiar o linkLink copiado para a área de transferência!
To install Red Hat Advanced Cluster Security for Kubernetes you must install the roxctl CLI by downloading the binary. You can install roxctl on Linux, Windows, or macOS.
3.3.2.1.1. Installing the roxctl CLI on Linux Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on Linux by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Linux/roxctl
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Linux/roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the
roxctlbinary executable:chmod +x roxctl
$ chmod +x roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Place the
roxctlbinary in a directory that is on yourPATH:To check your
PATH, execute the following command:echo $PATH
$ echo $PATHCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2.1.2. Installing the roxctl CLI on macOS Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on macOS by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Darwin/roxctl
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Darwin/roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove all extended attributes from the binary:
xattr -c roxctl
$ xattr -c roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the
roxctlbinary executable:chmod +x roxctl
$ chmod +x roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Place the
roxctlbinary in a directory that is on yourPATH:To check your
PATH, execute the following command:echo $PATH
$ echo $PATHCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2.1.3. Installing the roxctl CLI on Windows Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on Windows by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Windows/roxctl.exe
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Windows/roxctl.exeCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2.2. Using the interactive installer Copiar o linkLink copiado para a área de transferência!
Use the interactive installer to generate the required secrets, deployment configurations, and deployment scripts for your environment.
Procedure
Run the interactive install command:
roxctl central generate interactive
$ roxctl central generate interactiveCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantInstalling Red Hat Advanced Cluster Security for Kubernetes using
roxctlCLI creates PodSecurityPolicy (PSP) objects by default for backward compatibility. If you install RHACS on Kubernetes versions 1.25 and newer or OpenShift Container Platform version 4.12 and newer, you must disable the PSP object creation. To do this, specify--enable-pod-security-policiesoption asfalsefor theroxctl central generateandroxctl sensor generatecommands.Press Enter to accept the default value for a prompt or enter custom values as required.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- If you want to add a custom TLS certificate, provide the file path for the PEM-encoded certificate. When you specify a custom certificate the interactive installer also prompts you to provide a PEM private key for the custom certificate you are using.
- 2
- To use the RHACS portal, you must expose Central by using a route, a load balancer or a node port.
- 3
- If you plan to install Red Hat Advanced Cluster Security for Kubernetes on OpenShift Container Platform with a hostPath volume, you must modify the SELinux policy.
WarningOn OpenShift Container Platform, for using a hostPath volume, you must modify the SELinux policy to allow access to the directory, which the host and the container share. It is because SELinux blocks directory sharing by default. To modify the SELinux policy, run the following command:
sudo chcon -Rt svirt_sandbox_file_t <full_volume_path>
$ sudo chcon -Rt svirt_sandbox_file_t <full_volume_path>Copy to Clipboard Copied! Toggle word wrap Toggle overflow However, Red Hat does not recommend modifying the SELinux policy, instead use PVC when installing on OpenShift Container Platform.
On completion, the installer creates a folder named central-bundle, which contains the necessary YAML manifests and scripts to deploy Central. In addition, it shows on-screen instructions for the scripts you need to run to deploy additional trusted certificate authorities, Central and Scanner, and the authentication instructions for logging into the RHACS portal along with the autogenerated password if you did not provide one when answering the prompts.
3.3.2.3. Running the Central installation scripts Copiar o linkLink copiado para a área de transferência!
After you run the interactive installer, you can run the setup.sh script to install Central.
Procedure
Run the
setup.shscript to configure image registry access:./central-bundle/central/scripts/setup.sh
$ ./central-bundle/central/scripts/setup.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the necessary resources:
oc create -R -f central-bundle/central
$ oc create -R -f central-bundle/centralCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the deployment progress:
oc get pod -n stackrox -w
$ oc get pod -n stackrox -wCopy to Clipboard Copied! Toggle word wrap Toggle overflow After Central is running, find the RHACS portal IP address and open it in your browser. Depending on the exposure method you selected when answering the prompts, use one of the following methods to get the IP address.
Expand Exposure method Command Address Example Route
oc -n stackrox get route centralThe address under the
HOST/PORTcolumn in the outputhttps://central-stackrox.example.routeNode Port
oc get node -owide && oc -n stackrox get svc central-loadbalancerIP or hostname of any node, on the port shown for the service
https://198.51.100.0:31489Load Balancer
oc -n stackrox get svc central-loadbalancerEXTERNAL-IP or hostname shown for the service, on port 443
https://192.0.2.0None
central-bundle/central/scripts/port-forward.sh 8443https://localhost:8443https://localhost:8443
If you have selected autogenerated password during the interactive install, you can run the following command to see it for logging into Central:
cat central-bundle/password
$ cat central-bundle/password
3.4. Generating and applying an init bundle for RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
Before you install the SecuredCluster resource on a cluster, you must create an init bundle. The cluster that has SecuredCluster installed and configured then uses this bundle to authenticate with Central. You can create an init bundle by using either the RHACS portal or the roxctl CLI. You then apply the init bundle by using it to create resources.
You must have the Admin user role to create an init bundle.
3.4.1. Generating an init bundle Copiar o linkLink copiado para a área de transferência!
3.4.1.1. Generating an init bundle by using the RHACS portal Copiar o linkLink copiado para a área de transferência!
You can create an init bundle containing secrets by using the RHACS portal.
You must have the Admin user role to create an init bundle.
Procedure
Find the address of the RHACS portal based on your exposure method:
For a route:
oc get route central -n stackrox
$ oc get route central -n stackroxCopy to Clipboard Copied! Toggle word wrap Toggle overflow For a load balancer:
oc get service central-loadbalancer -n stackrox
$ oc get service central-loadbalancer -n stackroxCopy to Clipboard Copied! Toggle word wrap Toggle overflow For port forward:
Run the following command:
oc port-forward svc/central 18443:443 -n stackrox
$ oc port-forward svc/central 18443:443 -n stackroxCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Navigate to
https://localhost:18443/.
-
On the RHACS portal, navigate to Platform Configuration
Integrations. - Navigate to the Authentication Tokens section and click on Cluster Init Bundle.
- Click Generate bundle.
Enter a name for the cluster init bundle and click Generate.
- If you are installing using Helm charts, click Download Helm Values File to download the generated bundle.
- If you are installing using the Operator, click Download Kubernetes Secret File to download the generated bundle.
Store this bundle securely because it contains secrets. You can use the same bundle to create multiple secured clusters.
Next steps
- Apply the init bundle by creating a resource on the secured cluster.
- Install secured cluster services on each cluster.
3.4.1.2. Generating an init bundle by using the roxctl CLI Copiar o linkLink copiado para a área de transferência!
You can create an init bundle with secrets by using the roxctl CLI.
You must have the Admin user role to create init bundles.
Prerequisites
You have configured the ROX_API_TOKEN and the ROX_CENTRAL_ADDRESS environment variables.
Set the
ROX_API_TOKENand theROX_CENTRAL_ADDRESSenvironment variables:export ROX_API_TOKEN=<api_token>
$ export ROX_API_TOKEN=<api_token>Copy to Clipboard Copied! Toggle word wrap Toggle overflow export ROX_CENTRAL_ADDRESS=<address>:<port_number>
$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure
Run the following command to generate a cluster init bundle containing secrets:
For Helm installations:
roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output cluster_init_bundle.yaml
$ roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output cluster_init_bundle.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Operator installations:
roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output-secrets cluster_init_bundle.yaml
$ roxctl -e "$ROX_CENTRAL_ADDRESS" \ central init-bundles generate <cluster_init_bundle_name> \ --output-secrets cluster_init_bundle.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantEnsure that you store this bundle securely because it contains secrets. You can use the same bundle to set up multiple secured clusters.
Next Step
- Use the Red Hat OpenShift CLI to create resources using the init bundle.
3.4.1.3. Creating resources by using the init bundle Copiar o linkLink copiado para a área de transferência!
Before you install secured clusters, you must use the init bundle to create the required resources on the cluster that will allow the services on the secured clusters to communicate with Central.
If you are installing by using Helm charts, do not perform this step. Complete the installation by using Helm; See "Installing RHACS on secured clusters by using Helm charts" in the additional resources section.
Prerequisites
- You must have generated an init bundle containing secrets.
Procedure
To create resources, perform one of the following steps:
- In the OpenShift Container Platform web console, in the top menu, click + to open the Import YAML page. You can drag the init bundle file or copy and paste its contents into the editor, and then click Create.
Using the Red Hat OpenShift CLI, run the following command to create the resources:
oc create -f <init_bundle>.yaml \ -n <stackrox>
$ oc create -f <init_bundle>.yaml \1 -n <stackrox>2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the
kubectlCLI, run the following commands to create the resources:kubectl create namespace stackrox kubectl create -f <init_bundle>.yaml \ -n <stackrox>
$ kubectl create namespace stackrox1 $ kubectl create -f <init_bundle>.yaml \2 -n <stackrox>3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Next Step
- Install RHACS secured cluster services in all clusters that you want to monitor.
3.5. Installing secured cluster services for RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
You can install RHACS on your secured clusters for platforms such as Amazon Elastic Kubernetes Service (Amazon EKS), Google Kubernetes Engine (Google GKE), and Microsoft Azure Kubernetes Service (Microsoft AKS).
3.5.1. Installing RHACS on secured clusters by using Helm charts Copiar o linkLink copiado para a área de transferência!
You can install RHACS on secured clusters by using Helm charts with no customization, using the default values, or with customizations of configuration parameters.
3.5.1.1. Installing RHACS on secured clusters by using Helm charts without customizations Copiar o linkLink copiado para a área de transferência!
3.5.1.1.1. Adding the Helm chart repository Copiar o linkLink copiado para a área de transferência!
Procedure
Add the RHACS charts repository.
helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/
$ helm repo add rhacs https://mirror.openshift.com/pub/rhacs/charts/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The Helm repository for Red Hat Advanced Cluster Security for Kubernetes includes Helm charts for installing different components, including:
Central services Helm chart (
central-services) for installing the centralized components (Central and Scanner).NoteYou deploy centralized components only once and you can monitor multiple separate clusters by using the same installation.
Secured Cluster Services Helm chart (
secured-cluster-services) for installing the per-cluster (Sensor and Admission controller) and per-node (Collector) components.NoteDeploy the per-cluster components into each cluster that you want to monitor and deploy the per-node components in all nodes that you want to monitor.
Verification
Run the following command to verify the added chart repository:
helm search repo -l rhacs/
$ helm search repo -l rhacs/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.1.1.2. Installing the secured-cluster-services Helm chart without customization Copiar o linkLink copiado para a área de transferência!
Use the following instructions to install the secured-cluster-services Helm chart to deploy the per-cluster and per-node components (Sensor, Admission controller, and Collector).
To install Collector on systems that have Unified Extensible Firmware Interface (UEFI) and that have Secure Boot enabled, you must use eBPF probes because kernel modules are unsigned, and the UEFI firmware cannot load unsigned packages. Collector identifies Secure Boot status at the start and switches to eBPF probes if required.
Prerequisites
- You must have generated RHACS init bundle for your cluster.
- You must have the address and the port number that you are exposing the Central service on.
Procedure
Run the following command on your Kubernetes based clusters:
helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <path_to_cluster_init_bundle.yaml> \ --set clusterName=<name_of_the_secured_cluster> \ --set centralEndpoint=<endpoint_of_central_service>$ helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <path_to_cluster_init_bundle.yaml> \1 --set clusterName=<name_of_the_secured_cluster> \ --set centralEndpoint=<endpoint_of_central_service>2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command on OpenShift Container Platform clusters:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.1.2. Configuring the secured-cluster-services Helm chart with customizations Copiar o linkLink copiado para a área de transferência!
This section describes Helm chart configuration parameters that you can use with the helm install and helm upgrade commands. You can specify these parameters by using the --set option or by creating YAML configuration files.
Create the following files for configuring the Helm chart for installing Red Hat Advanced Cluster Security for Kubernetes:
-
Public configuration file
values-public.yaml: Use this file to save all non-sensitive configuration options. -
Private configuration file
values-private.yaml: Use this file to save all sensitive configuration options. Ensure that you store this file securely.
While using the secured-cluster-services Helm chart, do not modify the values.yaml file that is part of the chart.
3.5.1.2.1. Configuration parameters Copiar o linkLink copiado para a área de transferência!
| Parameter | Description |
|---|---|
|
| Name of your cluster. |
|
|
Address, including port number, of the Central endpoint. If you are using a non-gRPC capable load balancer, use the WebSocket protocol by prefixing the endpoint address with |
|
| Address of the Sensor endpoint including port number. |
|
| Image pull policy for the Sensor container. |
|
| The internal service-to-service TLS certificate that Sensor uses. |
|
| The internal service-to-service TLS certificate key that Sensor uses. |
|
| The memory request for the Sensor container. Use this parameter to override the default value. |
|
| The CPU request for the Sensor container. Use this parameter to override the default value. |
|
| The memory limit for the Sensor container. Use this parameter to override the default value. |
|
| The CPU limit for the Sensor container. Use this parameter to override the default value. |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Sensor. This parameter is mainly used for infrastructure nodes. |
|
|
The name of the |
|
| The name of the Collector image. |
|
| Address of the registry you are using for the main image. |
|
| Address of the registry you are using for the Collector image. |
|
|
Image pull policy for |
|
| Image pull policy for the Collector images. |
|
|
Tag of |
|
|
Tag of |
|
|
Either |
|
| Image pull policy for the Collector container. |
|
| Image pull policy for the Compliance container. |
|
|
If you specify |
|
| The memory request for the Collector container. Use this parameter to override the default value. |
|
| The CPU request for the Collector container. Use this parameter to override the default value. |
|
| The memory limit for the Collector container. Use this parameter to override the default value. |
|
| The CPU limit for the Collector container. Use this parameter to override the default value. |
|
| The memory request for the Compliance container. Use this parameter to override the default value. |
|
| The CPU request for the Compliance container. Use this parameter to override the default value. |
|
| The memory limit for the Compliance container. Use this parameter to override the default value. |
|
| The CPU limit for the Compliance container. Use this parameter to override the default value. |
|
| The internal service-to-service TLS certificate that Collector uses. |
|
| The internal service-to-service TLS certificate key that Collector uses. |
|
|
This setting controls whether Kubernetes is configured to contact Red Hat Advanced Cluster Security for Kubernetes with |
|
|
When you set this parameter as |
|
|
This setting controls whether the cluster is configured to contact Red Hat Advanced Cluster Security for Kubernetes with |
|
| This setting controls whether Red Hat Advanced Cluster Security for Kubernetes evaluates policies; if it is disabled, all AdmissionReview requests are automatically accepted. |
|
|
This setting controls the behavior of the admission control service. You must specify |
|
|
If you set this option to |
|
|
Set it to |
|
| The maximum time, in seconds, Red Hat Advanced Cluster Security for Kubernetes should wait while evaluating admission review requests. Use this to set request timeouts when you enable image scanning. If the image scan runs longer than the specified time, Red Hat Advanced Cluster Security for Kubernetes accepts the request. |
|
| The memory request for the Admission Control container. Use this parameter to override the default value. |
|
| The CPU request for the Admission Control container. Use this parameter to override the default value. |
|
| The memory limit for the Admission Control container. Use this parameter to override the default value. |
|
| The CPU limit for the Admission Control container. Use this parameter to override the default value. |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Admission Control. This parameter is mainly used for infrastructure nodes. |
|
| The internal service-to-service TLS certificate that Admission Control uses. |
|
| The internal service-to-service TLS certificate key that Admission Control uses. |
|
|
Use this parameter to override the default |
|
|
If you specify |
|
|
Specify |
|
|
Specify |
|
|
Specify |
|
| Resource specification for Sensor. |
|
| Resource specification for Admission controller. |
|
| Resource specification for Collector. |
|
| Resource specification for Collector’s Compliance container. |
|
|
If you set this option to |
|
|
If you set this option to |
|
|
If you set this option to |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Scanner DB. |
|
| Resource specification for Collector’s Compliance container. |
|
| Setting this parameter allows you to modify the scanner log level. Use this option only for troubleshooting purposes. |
|
|
If you set this option to |
|
| The minimum number of replicas for autoscaling. Defaults to 2. |
|
| The maximum number of replicas for autoscaling. Defaults to 5. |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Scanner. |
|
|
Specify a node selector label as |
|
| If the node selector selects tainted nodes, use this parameter to specify a taint toleration key, value, and effect for Scanner DB. |
|
| The memory request for the Scanner container. Use this parameter to override the default value. |
|
| The CPU request for the Scanner container. Use this parameter to override the default value. |
|
| The memory limit for the Scanner container. Use this parameter to override the default value. |
|
| The CPU limit for the Scanner container. Use this parameter to override the default value. |
|
| The memory request for the Scanner DB container. Use this parameter to override the default value. |
|
| The CPU request for the Scanner DB container. Use this parameter to override the default value. |
|
| The memory limit for the Scanner DB container. Use this parameter to override the default value. |
|
| The CPU limit for the Scanner DB container. Use this parameter to override the default value. |
3.5.1.2.1.1. Environment variables Copiar o linkLink copiado para a área de transferência!
You can specify environment variables for Sensor and Admission controller in the following format:
customize:
envVars:
ENV_VAR1: "value1"
ENV_VAR2: "value2"
customize:
envVars:
ENV_VAR1: "value1"
ENV_VAR2: "value2"
The customize setting allows you to specify custom Kubernetes metadata (labels and annotations) for all objects created by this Helm chart and additional pod labels, pod annotations, and container environment variables for workloads.
The configuration is hierarchical, in the sense that metadata defined at a more generic scope (for example, for all objects) can be overridden by metadata defined at a narrower scope (for example, only for the Sensor deployment).
3.5.1.2.2. Installing the secured-cluster-services Helm chart Copiar o linkLink copiado para a área de transferência!
After you configure the values-public.yaml and values-private.yaml files, install the secured-cluster-services Helm chart to deploy the per-cluster and per-node components (Sensor, Admission controller, and Collector).
To install Collector on systems that have Unified Extensible Firmware Interface (UEFI) and that have Secure Boot enabled, you must use eBPF probes because kernel modules are unsigned, and the UEFI firmware cannot load unsigned packages. Collector identifies Secure Boot status at the start and switches to eBPF probes if required.
Prerequisites
- You must have generated RHACS init bundle for your cluster.
- You must have the address and the port number that you are exposing the Central service on.
Procedure
Run the following command:
helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <name_of_cluster_init_bundle.yaml> \ -f <path_to_values_public.yaml> -f <path_to_values_private.yaml>
$ helm install -n stackrox --create-namespace \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ -f <name_of_cluster_init_bundle.yaml> \ -f <path_to_values_public.yaml> -f <path_to_values_private.yaml>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Use the
-foption to specify the paths for your YAML configuration files.
To deploy secured-cluster-services Helm chart by using a continuous integration (CI) system, pass the init bundle YAML file as an environment variable to the helm install command:
helm install ... -f <(echo "$INIT_BUNDLE_YAML_SECRET")
$ helm install ... -f <(echo "$INIT_BUNDLE_YAML_SECRET")
- 1
- If you are using base64 encoded variables, use the
helm install … -f <(echo "$INIT_BUNDLE_YAML_SECRET" | base64 --decode)command instead.
3.5.1.3. Changing configuration options after deploying the secured-cluster-services Helm chart Copiar o linkLink copiado para a área de transferência!
You can make changes to any configuration options after you have deployed the secured-cluster-services Helm chart.
Procedure
-
Update the
values-public.yamlandvalues-private.yamlconfiguration files with new values. Run the
helm upgradecommand and specify the configuration files using the-foption:helm upgrade -n stackrox \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ --reuse-values \ -f <path_to_values_public.yaml> \ -f <path_to_values_private.yaml>
$ helm upgrade -n stackrox \ stackrox-secured-cluster-services rhacs/secured-cluster-services \ --reuse-values \1 -f <path_to_values_public.yaml> \ -f <path_to_values_private.yaml>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- You must specify the
--reuse-valuesparameter, otherwise the Helm upgrade command resets all previously configured settings.
NoteYou can also specify configuration values using the
--setor--set-fileparameters. However, these options are not saved, and it requires you to manually specify all the options again whenever you make changes.
3.5.2. Installing RHACS on secured clusters by using the roxctl CLI Copiar o linkLink copiado para a área de transferência!
To install RHACS on secured clusters by using the CLI, perform the following steps:
-
Install the
roxctlCLI - Install Sensor.
3.5.2.1. Installing the roxctl CLI Copiar o linkLink copiado para a área de transferência!
You must first download the binary. You can install roxctl on Linux, Windows, or macOS.
3.5.2.1.1. Installing the roxctl CLI on Linux Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on Linux by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Linux/roxctl
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Linux/roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the
roxctlbinary executable:chmod +x roxctl
$ chmod +x roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Place the
roxctlbinary in a directory that is on yourPATH:To check your
PATH, execute the following command:echo $PATH
$ echo $PATHCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.2.1.2. Installing the roxctl CLI on macOS Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on macOS by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Darwin/roxctl
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Darwin/roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove all extended attributes from the binary:
xattr -c roxctl
$ xattr -c roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the
roxctlbinary executable:chmod +x roxctl
$ chmod +x roxctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Place the
roxctlbinary in a directory that is on yourPATH:To check your
PATH, execute the following command:echo $PATH
$ echo $PATHCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.2.1.3. Installing the roxctl CLI on Windows Copiar o linkLink copiado para a área de transferência!
You can install the roxctl CLI binary on Windows by using the following procedure.
Procedure
Download the latest version of the
roxctlCLI:curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Windows/roxctl.exe
$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Windows/roxctl.exeCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the
roxctlversion you have installed:roxctl version
$ roxctl versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.2.2. Installing Sensor Copiar o linkLink copiado para a área de transferência!
To monitor a cluster, you must deploy Sensor. You must deploy Sensor into each cluster that you want to monitor. The following steps describe adding Sensor by using the RHACS portal.
Prerequisites
- You must have already installed Central services, or you can access Central services by selecting your ACS instance on Red Hat Advanced Cluster Security Cloud Service (RHACS Cloud Service).
Procedure
-
On your secured cluster, in the RHACS portal, navigate to Platform Configuration
Clusters. - Select + New Cluster.
- Specify a name for the cluster.
Provide appropriate values for the fields based on where you are deploying the Sensor.
- If you are deploying Sensor in the same cluster, accept the default values for all the fields.
-
If you are deploying into a different cluster, replace
central.stackrox.svc:443with a load balancer, node port, or other address, including the port number, that is accessible from the other cluster. If you are using a non-gRPC capable load balancer, such as HAProxy, AWS Application Load Balancer (ALB), or AWS Elastic Load Balancing (ELB), use the WebSocket Secure (
wss) protocol. To usewss:-
Prefix the address with
wss://. -
Add the port number after the address, for example,
wss://stackrox-central.example.com:443.
-
Prefix the address with
- Click Next to continue with the Sensor setup.
Click Download YAML File and Keys to download the cluster bundle (zip archive).
ImportantThe cluster bundle zip archive includes unique configurations and keys for each cluster. Do not reuse the same files in another cluster.
From a system that has access to the monitored cluster, unzip and run the
sensorscript from the cluster bundle:unzip -d sensor sensor-<cluster_name>.zip
$ unzip -d sensor sensor-<cluster_name>.zipCopy to Clipboard Copied! Toggle word wrap Toggle overflow ./sensor/sensor.sh
$ ./sensor/sensor.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you get a warning that you do not have the required permissions to deploy Sensor, follow the on-screen instructions, or contact your cluster administrator for assistance.
After Sensor is deployed, it contacts Central and provides cluster information.
Verification
Return to the RHACS portal and check if the deployment is successful. If successful, when viewing your list of clusters in Platform Configuration
Clusters, the cluster status displays a green checkmark and a Healthy status. If you do not see a green checkmark, use the following command to check for problems: On Kubernetes, enter the following command:
kubectl get pod -n stackrox -w
$ kubectl get pod -n stackrox -wCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Click Finish to close the window.
After installation, Sensor starts reporting security information to RHACS and the RHACS portal dashboard begins showing deployments, images, and policy violations from the cluster on which you have installed the Sensor.
3.6. Verifying installation of RHACS on other platforms Copiar o linkLink copiado para a área de transferência!
Provides steps to verify that RHACS is properly installed.
3.6.1. Verifying installation Copiar o linkLink copiado para a área de transferência!
After you complete the installation, run a few vulnerable applications and navigate to the RHACS portal to evaluate the results of security assessments and policy violations.
The sample applications listed in the following section contain critical vulnerabilities and they are specifically designed to verify the build and deploy-time assessment features of Red Hat Advanced Cluster Security for Kubernetes.
To verify installation:
Find the address of the RHACS portal based on your exposure method:
For a load balancer:
kubectl get service central-loadbalancer -n stackrox
$ kubectl get service central-loadbalancer -n stackroxCopy to Clipboard Copied! Toggle word wrap Toggle overflow For port forward:
Run the following command:
kubectl port-forward svc/central 18443:443 -n stackrox
$ kubectl port-forward svc/central 18443:443 -n stackroxCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Navigate to
https://localhost:18443/.
Create a new namespace:
kubectl create namespace test
$ kubectl create namespace testCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start some applications with critical vulnerabilities:
kubectl run shell --labels=app=shellshock,team=test-team \ --image=vulnerables/cve-2014-6271 -n test kubectl run samba --labels=app=rce \ --image=vulnerables/cve-2017-7494 -n test
$ kubectl run shell --labels=app=shellshock,team=test-team \ --image=vulnerables/cve-2014-6271 -n test $ kubectl run samba --labels=app=rce \ --image=vulnerables/cve-2017-7494 -n testCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Red Hat Advanced Cluster Security for Kubernetes automatically scans these deployments for security risks and policy violations as soon as they are submitted to the cluster. Navigate to the RHACS portal to view the violations. You can log in to the RHACS portal by using the default username admin and the generated password.