Kube-Beacon Project
Scan your kubernetes runtime !!
Kube-Beacon is an open-source audit scanner who perform audit check on a deployed kubernetes cluster and output a security report.
The audit tests are the full implementation of CIS Kubernetes Benchmark specification
Audit checks are performed on master and worker nodes and the output audit report include :
- root cause of the security issue
- proposed remediation for security issue
kubernetes cluster audit scan output:
Installation
git clone https://github.com/chen-keinan/kube-beacon
cd kube-beacon
make install
- Note: kube-beacon require root user to be executed
Quick Start
Execute kube-beacon without any flags, execute all tests
./kube-beacon
Execute kube-beacon with flags, execute test on demand
Execute tests and generate failure tests report
./kube-beacon -r
Kube-beacon as Docker
Execute kube beacon via docker
docker run –pid=host -v /etc:/etc:ro -v /var:/var:ro -v /*/cni/*:/*/cni/* -v $HOME/.kube:/root/.kube:ro -v $(which kubectl):/usr/bin/kubectl -t kbeacon.jfrog.io/docker-local/kube-beacon
Kube-beacon as pod in k8s
- Execute kube beacon as a pod in k8s cluster
- Add cluster role binding with role=cluster-admin
- simple k8s cluster run following job
kubectl apply -f k8s.yaml
- gke cluster run the following jon
kubectl apply -f gke.yaml
- Check k8s pod status
- Check k8s pod audit output
kubectl logs kube-beacon-sc8g9
- cleanup (remove the role and delete pod)
kubectl delete clusterrolebinding default-adminkubectl delete -f k8s.yaml
Copyright (C) 2020