Managing the Workload Protection agent in a Satellite cluster by using a Helm chart
You can use a Helm chart to install, upgrade, and delete a Workload Protection agent on your Satellite clusters.
Before you begin
-
Install the IBM Cloud CLI, the Kubernetes Service plug-in, the IBM Cloud Container Registry plug-in, and the Red Hat OpenShift and Kubernetes CLIs. For more information, go to Installing the CLI.
-
Install the latest release of the Helm CLI on your local machine. Helm version 3.6 or later is required.
Helm is a Kubernetes package manager that uses Helm charts to define, install, and upgrade complex Kubernetes apps in your cluster. Helm charts package the specifications to generate YAML files for Kubernetes resources that build your app. These Kubernetes resources are automatically applied in your cluster and assigned to a version by Helm. You can also use Helm to specify and package your own app and let Helm generate the YAML files for your Kubernetes resources.
-
Get your Workload Protection
ingestendpoint. Access your Satellite location, then select Link endpoints and System endpoints. Copy thesystemendpoint starting withsatellite-sysdig-that is pointing toingest.private.<region>.monitoring.cloud.ibm.com. You can use this endpoint later asINGESTION_SATELLITE_ENDPOINT. -
Outbound traffic from your cluster to Workload Protection endpoints is required to port
443and6443. -
Verify that you have the required access and permissions to deploy the Workload Protection agent on the cluster.
-
Verify that the
ibm-observenamespace is available in your cluster. The agent is deployed in this namespace.To create the namespace, run
oc adm new-project --node-selector='' ibm-observe. -
Get your Workload Protection
ingestendpoint. Access your Satellite location, then select Link endpoints and System endpoints. Copy thesystemendpoint starting withsatellite-sysdig-that points toingest.private.<region>.monitoring.cloud.ibm.com. You can use this endpoint later asINGESTION_SATELLITE_ENDPOINT. -
Verify that outbound traffic from your cluster to Workload Protection endpoints is allowed on ports
443and6443.
Creating a Workload Protection Satellite link endpoint
Create an HTTPS Satellite Link by using the console or CLI to connect securely to Workload Protection private endpoints.
- Get your Workload Protection private endpoint. For example, if your Workload Protection instance is in
us-east, your endpoint isprivate.us-east.security-compliance-secure.cloud.ibm.com. - Access the Satellite Locations dashboard. Click Link endpoints, then click Create an endpoint.
- Select Cloud to create an endpoint for a service, server, or app that runs outside of the location.
- Enter an endpoint name, the destination domain name (FQDN) which is the Workload Protection private endpoint that was defined in step 1, and destination port
443. - Select the HTTPS protocol.
- Click Create. Wait a few minutes for the Satellite Link connector component to assign a port to your endpoint.
- In the table row for your endpoint, copy the hostname for your Satellite Link connector and the port for your endpoint in the Address field. You need to use it as the
API_ENDPOINTin the following steps.
Deploying an agent
Complete the following steps to deploy an agent by using Helm.
Set up the cluster context
-
Log in to your account. If you have a federated account, include the
--ssooption.ibmcloud login [-g <resource_group>] [--sso] -
Download and add the
kubeconfigconfiguration file for your cluster to your existingkubeconfigin~/.kube/configor the last file in theKUBECONFIGenvironment variable.ibmcloud oc cluster config --cluster <cluster_name_or_ID> -
In your browser, navigate to the address of your cluster controller URL and append
/console. For example,https://c0.containers.cloud.ibm.com:23652/console. -
From the Red Hat OpenShift web console menu bar, click your profile IAM#user.name@email.com > Copy Login Command. Display and copy the
oc logintoken command into your command line to authenticate from the CLI. -
Verify that the
occommands run properly with your cluster by checking the version.oc versionExample output:
Client Version: v4.11.0 Kubernetes Version: v1.25.8.2
Set up the Sysdig Helm repository
Add the Workload Protection Helm repository to your Helm instance.
-
Set the cluster context.
ibmcloud ks cluster config --cluster <CLUSTER_NAME> -
Add the Helm repository.
helm repo add sysdig https://charts.sysdig.com -
Update the repository to retrieve the latest versions of all Helm charts.
helm repo update -
List the Helm charts that are currently available for the Sysdig repository.
helm search repo sysdig -
Verify that the
sysdig/sysdig-deployHelm chart is listed.
Create the Helm values file
Define a YAML file and include the values to deploy the Workload Protection components that you plan to deploy. For example, name the file agent-values-monitor-secure.yaml.
The following YAML is a template that you can use to configure the Workload Protection components. You can customize the file by removing or commenting with # the sections that are not required for your agent deployment.
agent:
ebpf:
enabled: true
kind: universal_ebpf
collectorSettings:
collectorHost: INGESTION_SATELLITE_ENDPOINT
collectorPort: INGESTION_SATELLITE_ENDPOINT_PORT
slim:
enabled: true
global:
clusterConfig:
name: CLUSTER_NAME
kspm:
deploy: true
sysdig:
accessKey: SERVICE_ACCESS_KEY
apiHost: API_ENDPOINT
nodeAnalyzer:
secure:
vulnerabilityManagement:
newEngineOnly: true
nodeAnalyzer:
runtimeScanner:
deploy: false
benchmarkRunner:
deploy: false
hostScanner:
deploy: false
deploy: true
natsUrl: wss://API_ENDPOINT
sslVerifyCertificate: false
kspmCollector:
natsUrl: wss://API_ENDPOINT
sslVerifyCertificate: false
clusterScanner:
enabled: true
eveEnabled: true
sslVerifyCertificate: false
Where:
CLUSTER_NAME- The name of the cluster where you are deploying the agent.
SERVICE_ACCESS_KEY- The Workload Protection instance access key.
INGESTION_SATELLITE_ENDPOINT- The Satellite endpoint extracted previously that points to the ingest endpoint. For example,
c1bcda0323e0ef4b83aba-6b64a6ccc9c596bf59a86625d8fa2202-c111.us-east.satellite.appdomain.cloud. INGESTION_SATELLITE_ENDPOINT_PORT- The port from the Satellite endpoint extracted previously that points to the
ingestendpoint. For example,30771. API_ENDPOINT- The Satellite endpoint extracted previously that points to the Workload Protection private API endpoint. For example,
c1bcda0323e0ef4b83aba-6b64a6ccc9c596bf59a86625d8fa2202-c111.us-east.satellite.appdomain.cloud:31924. In this case, both hostname and port are defined together.
Install the Helm chart
To deploy the agent, the Workload Protection components, or both, install the sysdig/sysdig-deploy chart and use the variables YAML file that you configured in the previous step.
Run the following command to install the agent by using the Helm chart:
helm install -n ibm-observe sysdig-agent sysdig/sysdig-deploy -f agent-values-monitor-secure.yaml
If you want to directly install the Workload Protection components without a Helm values file, you can run the following command. Use --set to set all the variables.
helm install sysdig-agent sysdig/sysdig-deploy --namespace ibm-observe --create-namespace \
--set agent.ebpf.enabled=true \
--set agent.ebpf.kind=universal_ebpf \
--set global.sysdig.accessKey=<SERVICE_ACCESS_KEY> \
--set global.sysdig.apiHost=<API_ENDPOINT> \
--set agent.collectorSettings.collectorHost=<INGESTION_SATELLITE_ENDPOINT> \
--set agent.collectorSettings.collectorPort=<INGESTION_SATELLITE_ENDPOINT_PORT> \
--set nodeAnalyzer.natsUrl=wss://<API_ENDPOINT> \
--set nodeAnalyzer.nodeAnalyzer.runtimeScanner.deploy=false \
--set nodeAnalyzer.nodeAnalyzer.hostScanner.deploy=false \
--set nodeAnalyzer.nodeAnalyzer.benchmarkRunner.deploy=false \
--set nodeAnalyzer.nodeAnalyzer.sslVerifyCertificate=false \
--set nodeAnalyzer.secure.vulnerabilityManagement.newEngineOnly=true \
--set global.kspm.deploy=true \
--set global.clusterConfig.name=<CLUSTER_NAME> \
--set kspmCollector.natsUrl=wss://<API_ENDPOINT> \
--set kspmCollector.sslVerifyCertificate=false \
--set clusterScanner.enabled=true \
--set clusterScanner.eveEnabled=true \
--set clusterScanner.sslVerifyCertificate=true
Where:
CLUSTER_NAME- The name of the cluster where you are deploying the agent.
SERVICE_ACCESS_KEY- The Workload Protection instance access key.
INGESTION_SATELLITE_ENDPOINT- The Satellite endpoint extracted previously that points to the
ingestendpoint. For example,c1bcda0323e0ef4b83aba-6b64a6ccc9c596bf59a86625d8fa2202-c111.us-east.satellite.appdomain.cloud. INGESTION_SATELLITE_ENDPOINT_PORT- The port from the Satellite endpoint extracted previously that points to the
ingestendpoint. For example,30771. API_ENDPOINT- The Satellite endpoint extracted previously that points to the Workload Protection private API endpoint. For example,
c1bcda0323e0ef4b83aba-6b64a6ccc9c596bf59a86625d8fa2202-c111.us-east.satellite.appdomain.cloud:31924. In this case, both hostname and port are defined together.
Updating an agent
Update the Workload Protection agent at least once every 2 months.
To update the agent version by using Helm, complete the following steps:
-
Update the Helm repository.
helm repo update -
Upgrade the agent.
helm upgrade -n ibm-observe sysdig-agent sysdig/sysdig-deploy -f agent-values-monitor-secure.yaml
Removing an agent
To delete the agent by using Helm, uninstall the chart.
-
List the charts that are installed.
helm list -n ibm-observeThe output lists the installed charts:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION sysdig-agent ibm-observe 1 2023-03-24 15:02:58.408108 +0100 CET deployed sysdig-deploy-1.37.10 -
Uninstall the chart.
helm delete sysdig-agent -n ibm-observeIn Helm,
sysdig-agentis the name of the release.