Monitoring Serverless Pod
Created:2023-10-04 Last Modified:2025-08-29
This document was translated by ChatGPT
#1. Introduction
DeepFlow Agent can be deployed as a Sidecar inside a Serverless Pod. Assuming you have already deployed DeepFlow Server in a K8s cluster, this chapter describes how to monitor applications inside a Serverless Pod.
#2. Deployment Topology
#3. Deploy deepflow-agent
Modify the value file to deploy deepflow-agent as a daemonset and inject it as a sidecar, and obtain clusterNAME via deepflow-ctl domain list:
cat << EOF > values-custom.yaml
deployComponent:
- "watcher"
- "daemonset"
tkeSidecar: true
daemonsetWatchDisabled: true
clusterNAME: $clusterNAME # FIXME: domain name
EOF
helm install deepflow-agent -n deepflow deepflow/deepflow-agent --version 6.6.018 --create-namespace -f values-custom.yaml
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
The above command will deploy two sets of deepflow-agent:
- watcher: A deepflow-agent deployment used to synchronize K8s resources.
- During deployment, the environment variable
K8S_WATCH_POLICY=watch-onlywill be automatically injected. In this case, deepflow-agent will only synchronize K8s resources and will not collect observability data.
- During deployment, the environment variable
- daemonset: Injects deepflow-agent as a sidecar into each serverless pod to collect observability data.
- Note: When there is no watcher-type deepflow-agent running, deepflow-server will elect a daemonset-type deepflow-agent to synchronize K8s resources.
- Therefore, to ensure that such deepflow-agents do not consume more resources due to being elected for K8s resource synchronization, the environment variable
K8S_WATCH_POLICY=watch-disabledis automatically injected for them.
#4. Next Steps
- Universal Service Map - Experience DeepFlow's AutoMetrics capability
- Distributed Tracing - Experience DeepFlow's AutoTracing capability
- Eliminate Data Silos - Learn about DeepFlow's AutoTagging and SmartEncoding capabilities
- Say Goodbye to High Cardinality Issues - Integrate Prometheus and other metrics data
- Full-Stack Distributed Tracing - Integrate OpenTelemetry and other tracing data