Skip to content

Commit

Permalink
FAQ for kind with apparmor deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Jadhav <[email protected]>
  • Loading branch information
nyrahul committed Sep 16, 2023
1 parent c35a98a commit 4bc5a33
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions getting-started/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,35 @@ One can enable the host policy by patching the daemonset (`kubectl edit daemonse
This will enable the `KubeArmorHostPolicy` and host based visibility for the k8s worker nodes.

</details>

<details><summary><h4>Unable to get KubeArmor policy enforcement with Kind clusters</h4></summary>

KubeArmor works out of the box with Kind clusters supporting BPF-LSM. You can check if BPF-LSM is supported/enabled on your host (on which the kind cluster is to be deployed) by using following:
```
cat /sys/kernel/security/lsm
```
* If it has `bpf` in the list, then everything should work out of the box
* If it has `apparmor` in the list, then follow the steps mentioned in this FAQ.

## 1. Create Kind cluster
```sh
cat <<EOF | kind create cluster --config -
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- extraMounts:
- hostPath: /sys/kernel/security
containerPath: /sys/kernel/security
EOF
```

## 2. Exec into kind node & install apparmor util
```sh
docker exec -it kind-control-plane bash
apt update && apt install apparmor-utils -y && systemctl restart containerd
```

After this, exit out of the node shell and follow the [getting-started guide](https://github.com/kubearmor/KubeArmor/blob/main/getting-started/deployment_guide.md).

</details>

2 changes: 1 addition & 1 deletion getting-started/deployment_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ EOF

Now execute the `apt` command to download the `masscan` tool.
```
kubectl exec -it $POD -- sh -c "apt update && apt install masscan"
kubectl exec -it $POD -- bash -c "apt update && apt install masscan"
```

It will be denied permission to execute.
Expand Down

0 comments on commit 4bc5a33

Please sign in to comment.