- 24 May 2023
- 1 Minute to read
- Updated on 24 May 2023
- 1 Minute to read
The topic explains how to use Terraform to install the Traceable platform agent in a Kubernetes environment. Make sure that Terraform is already installed before proceeding with installing Traceable Platform agent. For more information on installing Terraform, see Download Terraform.
Before you begin
Keep the Traceable agent token handy. Navigate to Traceable's platform and navigate to Administration () > Account > Access Tokens > Agent Token. Copy and save the token. It would be required in the Traceable agent installation process.
Enter the following command to download the latest Terraform tarball:
curl -O https://downloads.traceable.ai/install/traceable-agent/terraform/kubernetes/latest/traceable-agent-tf-k8s.tar.gz
Complete the following steps to install
traceable-agent. Make sure
traceableainamespace by entering the following command:ActionScript
kubectl create namespace traceableai
- Untar the Terraform archive that you downloaded earlier. Enter the following command:ActionScript
tar xvzf traceable-agent-tf-k8s.tar.gz
- Change the directory.ActionScript
- Initialize the module by entering the following command:ActionScript
- Review the setup that will be installed by entering the following command. Add the agent token that you downloaded earlier.ActionScript
terraform plan -var='token='
- Apply the module by entering the following command:ActionScript
terraform apply -var='token='Note:Terraform creates a
terrafrom.tfstatefile. The file stores the current state of the infrastructure. It is recommended to keep track of this file.
Load balance Platform agent
In a deployment where you have deployed more than one Traceable Platform agent, and you expect high span load, you load balance the spans among the Platform agents. Load balancing is available in Platform agent 1.26.0 and later and only applies to the Go agent. In Helm chart, add the following value:
Verify the installation
Enter the following command to verify a successful installation of
kubectl get pods -n traceableai
NAME READY STATUS RESTARTS AGE traceable-agent-d8ff7cd79-qn2wb 1/1 Running 0 34m