> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/web-application-and-api-protection-waap/installation/platform-agent/kubernetes/yaml.md).

# YAML

Make sure that you have gone through the prerequisites and other information in the [Kubernetes](/web-application-and-api-protection-waap/installation/platform-agent/kubernetes.md) topic before proceeding ahead.

## Label Namespace

**Create traceable namespace**\
Enter the following command to create a traceableai namespace:

```actionscript
kubectl create namespace traceableai
```

***

## 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>

```actionscript
kubectl --namespace traceableai create secret generic cluster-name-secret --from-literal=cluster-name=$CLUSTER_NAME
```

**Generate token**\
Enter the following command to generate a unique token:

> export TOKEN=\<Traceable Token>

```actionscript
kubectl --namespace traceableai create secret generic token-secret --from-literal=token=$TOKEN
```

**Apply the YAML file**\
Enter the following command to apply Traceable’s YAML file:

```actionscript
kubectl apply -f https://downloads.traceable.ai/install/traceable-agent/manifests/kubernetes/latest/traceableai.yaml
```

**Set an environment variable**

```actionscript
kubectl set env deployment/traceable-agent -n traceableai TA_ENVIRONMENT=$ENV
```

**Restart the pods**

```actionscript
kubectl rollout restart deployment -n $NAMESPACE
```

***

## Verify

Enter the following command to verify a successful installation of traceable-agent:

```actionscript
kubectl -n traceableai get pods
```

For example,

```actionscript
NAME                               READY   STATUS    RESTARTS   AGE
traceable-agent-6df69c9886-lsfz4   1/1     Running   0          9m24s
```
