DaemonSet mirroring
Traceable provides you with an option to mirror the traffic for Kubernetes pods by running the Traceable agent in a daemonSet. As shown in the diagram below, each worker node has a Traceable Platform agent pod running. The Traceable agent pod has two containers, the Traceable Platform agent container and the mirroring container.

Before You Begin
Keep the TA_REFRESH_TOKEN handy. It will be required while installing the Traceable Platform Agent. To fetch the token, log into Traceable Platform and navigate to Settings (
) > Account > Agent Token.
Download
There is no download required for DaemonSet agentless traffic mirroring. The installation is completed using the Helm chart or Terraform template.
Installation
The installation process consists of the following steps:
Create
traceableainamespaceInstall Platform Agent
Enable mirroring
[optional] Set mirroring mode
Step 1 - Create traceableai namespace
Create a traceableai namespace. Enter the following command:
ActionScript
Step 2 - Install Platform agent
You can install Traceable platform agent in Kubernetes environment using either Helm chart or Terraform template.
Install using Helm chart
Create a
values.yamlfile with the following content:YAMLEnter the following commands to install Traceable Platform Agent into your Kubernetes cluster:ActionScript
Install using Terraform
Create a
main.tffile with the following content:ActionScriptInitialize the module by entering the following command:ActionScript
Review the setup that will be installed by entering the following command:ActionScript ActionScript
Apply the module by entering the following command:ActionScript ActionScript
Terraform creates a
terraform.tfstatefile. The file stores the current state of the infrastructure. It is recommended to keep track of this file.
Step 3 - Enable mirroring
To configure mirroring, go through the following points:
Enable mirroring for all namespaces - Mirroring is disabled by default. To enable mirroring for all namespaces, use the following configuration:
If you are using Helm, then in
values.yaml, set -daemonSetMirrorAllNamespaces: trueIf you are using Terraform, then in
main.tf, set -daemon_set_mirror_all_namespaces=true
Enable mirroring for a namespace - set the namespace label
traceableai-mirrortoenabled.Disable mirroring for a namespace - set the namespace label
traceableai-mirrortodisabled.Disable mirroring for a pod - set the pod annotation
mirror.traceable.ai/enabledtofalse.
Step 4 [optional] - Set mirroring mode
By default, only ingress traffic is captured. However, you can capture only egress traffic, or both ingress and egress traffic, by configuring correct annotations.
Capture egress traffic
To capture the egress traffic for a deployment or namespace, set the following annotations.
Deployment
To capture the egress traffic, set the deployment annotation mirror.traceable.ai/mode to egress. Enter the following command:
Namespace
To capture egress traffic at the namespace level, set the annotation mirror.traceable.ai/defaultMode to egress. Enter the following:
Capture ingress and egress traffic
To capture both ingress and egress traffic for a deployment or namespace, set the following annotations.
Deployment
To capture ingress and egress traffic for a deployment, set the deployment annotation mirror.traceable.ai/mode toingress_and_egress. Enter the following command:
Namespace
To capture the ingress and egress traffic at a namespace level, set the annotation mirror.traceable.ai/defaultMode to ingress_and_egress. Enter the following command:
Verification
To verify a successful installation of traceable-agent, enter the following command:
ActionScript
For example,
ActionScript
You can also check whether traces are showing in the Traceable Platform by navigating to Traces.
Troubleshooting
If traces are not showing in Traceable Platform, then:
Enter the following command to fetch the Traceable agent pod name:ActionScript ActionScript
Enter the following command to get the logs of pods being monitored:ActionScript ActionScript
For example,ActionScript ActionScript
Upgrade
You can upgrade the Traceable agent in Kubernetes using either Helm chart or Terraform.
Upgrade using Helm
Enter the following commands:
Update helm charts by entering the following command:ActionScript ActionScript
Enter the following command to upgrade Traceable agent to the latest version:ActionScript ActionScript
Upgrade using Terraform
To upgrade using terraform, you would need to uninstall and reinstall the Platform agent.
Uninstall
You can uninstall the agent using either Helm chart or Terraform.
Uninstall using Helm
Enter the following command to uninstall the Platform agent using Helm:
ActionScript
Uninstall using Terraform
Enter the following command from the directory containing main.tf template file:
ActionScript
Last updated
Was this helpful?