Configure Rapid Response
To enable Rapid Response:
For more details, see Rapid Response.
Configure Rapid Response
You can enable and configure Rapid Response with the following parameters in the shield
chart values.yaml
configuration file, under the features.respond.rapid_response
section:
Property | Description | Type | Required | Default | Example |
---|---|---|---|---|---|
enabled | Define whether to enable the feature | boolean | No | false | |
password | Defines the password to authenticate from the Sysdig UI. | string | Yes, if the feature is enabled. Otherwise, no. |
Enable Response Tools
You can configure the Shield Chart to enable Response tools which extend Host Shield’s default capabilities:
Extend the Container Image
Extend the Host Shield container image to provision additional tools to the workload:
Create a custom Dockerfile.
Add any tool you want to respond to the Dockerfile. In this example, we add
kubectl
:FROM quay.io/sysdig/agent-slim:latest RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ chmod +x kubectl && \ mv ./kubectl /usr/local/bin/kubectl
Build the image and host it in a registry of your preference
Customize the shield chart to use it. Use
host.image.registry
,host.image.repository
andhost.image.shield_name
to customize it.Note that the repository will be used to pull the
agent-kmodule
image as well. You can customize its name viahost.image.kmodule_name
. For information on available chart parameters and their specifications, see the Shield Chart.
Once you have provisioned additional tools for the workload, they will be available when needed later on.
Extend the Cluster Permissions
To execute actions on the Kubernetes control plane, provide the Host Shield role with additional permissions. There are two alternative ways to achieve this:
- You can provide additional permissions via a custom ClusterRole, to be assigned to the Host Shield’s Service Account (default:
shield-host
) through a dedicatedClusterRoleBinding
. For instance, here we’re adding the possibility to execute, attach, and portforward, as well as the possibility to modify networking rules:
Expand
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: shield-host-rr
rules:
- apiGroups:
- ""
resources:
- pods/exec
- pods/attach
- pods/portforward
verbs:
- create
- get
- apiGroups:
- networking.k8s.io
resources:
- networkpolicies
- ingresses
verbs:
- get
- list
- watch
- create
- delete
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: shield-host-rr
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: shield-host-rr
subjects:
- kind: ServiceAccount
name: sysdig-shield-host
namespace: sysdig
- You can provision the Host Shield with a ServiceAccount of your preference, provisioned separately. You can proceed this way by setting
host.rbac.create
tofalse
, as you will provide the ServiceAccount andhost.rbac.service_account_name
to the ServiceAccount name. Equivalently to the above:
Expand
apiVersion: v1
kind: ServiceAccount
metadata:
name: shield-host-rr
namespace: sysdig
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: shield-host-rr
rules:
- apiGroups:
- ""
resources:
- pods
- replicationcontrollers
- services
- endpoints
- events
- limitranges
- namespaces
- nodes
- nodes/metrics
- nodes/proxy
- resourcequotas
- persistentvolumes
- persistentvolumeclaims
- configmaps
- pods/log
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- pods/exec
- pods/attach
- pods/portforward
verbs:
- create
- get
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- networkpolicies
- ingresses
verbs:
- get
- list
- watch
- create
- delete
- patch
- update
- apiGroups:
- extensions
resources:
- daemonsets
- deployments
- replicasets
verbs:
- get
- list
- watch
- nonResourceURLs:
- /metrics
verbs:
- get
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
verbs:
- get
- list
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: shield-host-rr
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: shield-host-rr
subjects:
- kind: ServiceAccount
name: shield-host-rr
namespace: sysdig
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.