Skip to content

Commit 456850f

Browse files
committed
update README
1 parent e441d03 commit 456850f

File tree

3 files changed

+89
-11
lines changed

3 files changed

+89
-11
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# newer versions go on top
2-
- version: "0.0.1"
2+
- version: "0.0.2"
33
changes:
4+
- description: Change README
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/3190
47
- description: Initial draft of the package
58
type: enhancement
69
link: https://github.com/elastic/integrations/pull/3113

packages/cloud_security_posture/docs/README.md

Lines changed: 84 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
This integration compares [Kubernetes](https://kubernetes.io/) configuration against CIS benchmark checks. It computes a score that ranges between 0 - 100. This integration requires access to node files, node processes, and the Kuberenetes api-server therefore it assumes the agent will be installed as a [DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) with the proper [Roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) and [RoleBindings](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) attached.
44

5-
See agent [installation instructions](https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html).
6-
7-
Additionally, In order for the integration to be installed, The Cloud Security Posture Kibana plugin must be enabled.
8-
9-
This could be done by adding the following configuration line to `kibana.yml`:
10-
```
11-
xpack.cloudSecurityPosture.enabled: true
12-
```
13-
145
## Leader election
156

167
To collect cluster level data (compared to node level information) the integration makes use of the [leader election](https://www.elastic.co/guide/en/fleet/master/kubernetes_leaderelection-provider.html) mechanism.
@@ -26,3 +17,87 @@ The Kubernetes package is tested with Kubernetes 1.21.x
2617
## Dashboard
2718

2819
CIS Kubernetes Benchmark integration is shipped including default dashboards and screens to manage the benchmark rules and inspect the compliance score and findings.
20+
21+
## Deployment
22+
23+
#### Configure Kibana
24+
25+
In order for the integration to be installed, The Cloud Security Posture Kibana plugin must be enabled.
26+
27+
This could be done by adding the following configuration line to `kibana.yml`:
28+
```
29+
xpack.cloudSecurityPosture.enabled: true
30+
```
31+
For Cloud users, see [Edit Kibana user settings](https://www.elastic.co/guide/en/cloud/current/ec-manage-kibana-settings.html).
32+
33+
34+
#### Deploy the Elastic agent
35+
36+
Just like every other integration, the KSPM integration requires an Elastic agent to be deployed.
37+
38+
See agent [installation instructions](https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html).
39+
40+
Note, if you want to add this integration to existing Elastic agents (deployed prior to 8.3 release), you'll have to update your Deamonset to include the additional required volumes and volume mounts.
41+
This can be done in a few steps:
42+
43+
1. Create a patch file including all the necessary volumes and volume mounts:
44+
```bash
45+
cat << EOF > volumes-patch.yml
46+
spec:
47+
template:
48+
spec:
49+
containers:
50+
- name: elastic-agent
51+
volumeMounts:
52+
- mountPath: /hostfs/proc
53+
name: proc
54+
readOnly: true
55+
- mountPath: /hostfs/sys/fs/cgroup
56+
name: cgroup
57+
readOnly: true
58+
- mountPath: /var/lib/docker/containers
59+
name: varlibdockercontainers
60+
readOnly: true
61+
- mountPath: /var/log
62+
name: varlog
63+
readOnly: true
64+
- mountPath: /hostfs/etc/kubernetes
65+
name: etc-kubernetes
66+
readOnly: true
67+
volumes:
68+
- hostPath:
69+
path: /proc
70+
type: ""
71+
name: proc
72+
- hostPath:
73+
path: /sys/fs/cgroup
74+
type: ""
75+
name: cgroup
76+
- hostPath:
77+
path: /var/lib/docker/containers
78+
type: ""
79+
name: varlibdockercontainers
80+
- hostPath:
81+
path: /var/log
82+
type: ""
83+
name: varlog
84+
- hostPath:
85+
path: /etc/kubernetes
86+
type: ""
87+
name: etc-kubernetes
88+
EOF
89+
```
90+
91+
2. Apply the patch file to your Kubernetes cluster
92+
```bash
93+
kubectl patch ds elastic-agent -n kube-system --patch-file volumes-patch.yml
94+
# Expected result:
95+
# daemonset.apps/elastic-agent patched
96+
```
97+
98+
3. Check if the update was successful
99+
```bash
100+
kubectl rollout status ds/elastic-agent -n kube-system
101+
# Expected result:
102+
# daemon set "elastic-agent" successfully rolled out
103+
```

packages/cloud_security_posture/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 1.0.0
22
name: cloud_security_posture
33
title: "CIS Kubernetes Benchmark"
4-
version: 0.0.1
4+
version: 0.0.2
55
license: basic
66
description: "Check Kubernetes cluster compliance with the Kubernetes CIS benchmark."
77
type: integration

0 commit comments

Comments
 (0)