Deployment
Kubernetes UniAgent Installation Package
Check Whether the Environment Meets the Requirements
First, check whether the Kubernetes node (operating system, available CPU, available memory, available storage, etc.) meets the minimum requirements for running the eBPF Agent.
- Node kernel version: higher than 4.15.0
- Node available CPU: 1 core or above
- Node available memory: 1GB or above
- Node available storage: 1GB or above
Then check the version of the deployed Kubernetes UniAgent. The eBPF Agent requires Kubernetes UniAgent version >= 2.4.1.0, and the platform needs to enable Infra host authorization. By default, the eBPF Agent function is disabled and needs to be enabled manually.
Enable the eBPF Agent
Change ebpf_enabled: false to ebpf_enabled: true in tingyun-common-config in tingyunagent.yaml.
apiVersion: v1
kind: ConfigMap
metadata:
name: tingyun-common-config
namespace: tingyun
data:
VERSION: |
2.4.1.0
tingyun-common.yaml: |
# Whether to enable the EBPF network data collection function, true or false
# If you enable the EBPF function, you also need to modify the Daemonset tingyun-linux-agent requests cpu to 0.5, memory to 1Gi, and restart the Daemonset tingyun-linux-agent
ebpf_enabled: false # Change to true
Modify the requests cpu to 0.5 and memory to 1GiB for the Daemonset tingyun-linux-agent in tingyunagent.yaml.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: tingyun-linux-agent
namespace: tingyun
spec:
selector:
matchLabels:
vendor: tingyun
component: linux-agent
template:
spec:
containers:
- name: linux
image: tingyunagent/infra-agent:2.4.0.0
securityContext:
privileged: true
runAsUser: 0
resources:
limits:
cpu: "2"
memory: "2Gi"
requests:
cpu: "0.5" # Change cpu to 0.5
memory: "1Gi" # Change memory to 1Gi
Then update using the yaml file.
kubectl apply -f tingyunagent.yaml
If the tingyunagent.yaml installation file is lost, you can use the edit configmap command to modify the configuration.
kubectl edit configmap tingyun-common-config -n tingyun
Check whether the eBPF Agent is started. Run the following command on each node:
kubectl -n tingyun exec -ti tingyun-linux-agent-xxxxx -- ps -ef | grep ebpf_agent | grep -v grep
If the process exists, the eBPF Agent is running. If the process does not exist, the eBPF Agent is not running.
View eBPF Agent Logs
The eBPF Agent logs are stored in the pod of the Daemonset tingyun-linux-agent under /opt/agent/ebpf.
View work logs:
kubectl -n tingyun exec -ti tingyun-linux-agent-vrtwk -- cat /opt/agent/ebpf/logs/ebpf-agent.log
View meltdown logs:
kubectl -n tingyun exec -ti tingyun-linux-agent-vrtwk -- cat /opt/agent/ebpf/restart.log