Kubernetes Deployment (DaemonSet)
Preparation Before Deployment
Permission Requirements
- Cluster administrator privileges are required (able to create DaemonSet, ConfigMap, ServiceAccount, etc.).
Environment Requirements
Kubernetesversion ≥1.17kubectloroccommand-line tool installed and configured.- Ensure all nodes can access the public addresses for SmartAgent download and reporting (oneupload.bonree.com).
Deployment Steps
-
Log in to the
Bonree ONEplatform. -
Go to Configuration > Agent Installation > Kubernetes.
-
Fill in the
Cluster Name. -
Copy and execute the deployment command on the Kubernetes control node, for example:
kubectl apply -f 'https://one.bonree.com/rest/apm/agentDown/download/yml/v2?os=os&arch=arch&smartAgentVersion=<smartAgentVersion>&smartGateVersion=&aid=<accountGUID>'
Uninstallation
# Delete SmartAgent DaemonSet
kubectl delete -n bonree-agent ds/bonree-smartagent
# [Optional/Required for switching to host deployment] Execute as root on the host to completely uninstall SmartAgent
sh /{agent-path}/bonree/apm/scripts/uninstall.sh
(Default installation path: /opt)
warning
After uninstalling SmartAgent, do not immediately delete agent residual and runtime directories on all monitored containers until they have restarted and monitoring is canceled, otherwise it may cause abnormal behavior in existing business containers.
Advanced Configuration
For advanced configuration of the SmartAgent YAML, please refer to:
📄️ Custom Mounts and Non-Privileged Container Deployment
Introduction to customizing host mounts and adjusting non-privileged container deployments.
📄️ Update Agent Configuration via Kubernetes ConfigMap
Guide on how to update agent configuration using Kubernetes ConfigMap.