Search…
Kubectl

Label Namespace

Create traceable namespace Enter the following command to create a traceableai namespace:
1
kubectl create namespace traceableai
Copied!

Install traceable service in a Kubernetes cluster

Enter the following command to install traceable service in a Kubernetes cluster. Give a meaningful name to the cluster to identify it on Traceable’s Dashboard:
export CLUSTER_NAME=<cluster name> export ENV=<dev,test,stage,prod>
1
kubectl --namespace traceableai create secret generic cluster-name-secret --from-literal=cluster-name=$CLUSTER_NAME
Copied!
Generate token Enter the following command to generate a unique token:
export TOKEN=<Traceable Token>
1
kubectl --namespace traceableai create secret generic token-secret --from-literal=token=$TOKEN
Copied!
Apply the YAML file Enter the following command to apply Traceable’s YAML file:
1
kubectl apply -f https://traceableai.github.io/charts/install/agent/kubernetes/traceableai.yaml
Copied!

Set an environment variable

1
kubectl set env deployment/traceable-agent -n traceableai TA_ENVIRONMENT=$ENV
Copied!

Restart the pods

1
kubectl rollout restart deployment -n $NAMESPACE
Copied!

Verify

Enter the following command to verify a successful installation of traceable-agent:
1
kubectl -n traceableai get pods
Copied!
For example,
1
NAME READY STATUS RESTARTS AGE
2
traceable-agent-6df69c9886-lsfz4 1/1 Running 0 9m24s
Copied!
Last modified 1mo ago