专业的编程技术博客社区

网站首页 > 博客文章 正文

Falco安装部署流程(fax怎么安装)

baijin 2024-08-24 22:30:11 博客文章 8 ℃ 0 评论

Falco安裝部署流程

部署方法

Falco能够直接部署在物理主机上,也能够以容器方式部署,还能以DaemonSet部署在Kubernetes集群中。

在这里,我们给出手动以DaemonSet方式在Kubernetes集群上部署Falco的过程,其他部署方法可以参考官方文档。

安装内核头文件

前面提到,Falco依赖于Sysdig内核模块。因此,我们需要在Kubernetes集群的每个节点上安装内核头文件:

sudo apt-get install linux-headers-$(uname -r)

注:范例K8S测试环境节点使用Ubuntu系统,其他Linux发行版使用等效命令安装即可。

创建K8S资源

获取远程仓库:

git clone http://github.com/falcosecurity/falco/

cd falco/integrations/Kubernetes-using-daemonset

创建ServiceAccount并提供必要的RABC权限:

kubectl apply -f Kubernetes-with-rbac/falco-account.yaml

创建Falco服务(如果不需要Kubernetes审计日志作为事件源,可以跳过此步骤):

kubectl apply -f Kubernetes-with-rbac/falco-service.yaml


创建ConfigMap来存储Falco的配置,这样一来我们即使更改配置也不必重新构建、部署Pods:


创建DaemonSet:

kubectl apply -f Kubernetes-with-rbac/falco-daemonset-configmap.yaml

测试

获取Pod日志:

kubectl logs -l app=falco-example


日志显示Falco已经正常运行:


* Trying to load a dkms falco-probe, if present

falco-probe found and loaded in dkms

Thu Sep 19 02:09:44 2019: Falco initialized with configuration file /etc/falco/falco.yaml

Thu Sep 19 02:09:44 2019: Loading rules from file /etc/falco/falco_rules.yaml:

Thu Sep 19 02:09:44 2019: Loading rules from file /etc/falco/falco_rules.local.yaml:

Thu Sep 19 02:09:44 2019: Loading rules from file /etc/falco/Kubernetes_audit_rules.yaml:

Thu Sep 19 02:09:45 2019: Starting internal webserver, listening on port 8765

02:09:45.241612000: Notice Privileged container started (user=root command=container


Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表