> 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-discovery-discovery-api-security-testing/installation/platform-agent/kubernetes/yaml.md).

# YAML

Install the Traceable Platform agent in Kubernetes using YAML manifests, including namespace labeling and deployment steps

Make sure that you have gone through the prerequisites and other information in the Kubernetes topic before proceeding ahead.

## Label namespace

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

```bash
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>

```bash
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>

```bash
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:

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

**Set an environment variable**

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

**Restart the pods**

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

***

## Verify

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

```bash
kubectl -n traceableai get pods
```

For example,

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

***

## Next steps

Go to [Introduction](https://developer.harness.io/web-application-and-api-protection-waap-discovery-discovery-api-security-testing/installation/platform-agent/kubernetes/introduction.md) for details.

Go to [Helm](https://developer.harness.io/web-application-and-api-protection-waap-discovery-discovery-api-security-testing/installation/platform-agent/kubernetes/helm.md) for details.

Go to [Terraform](https://developer.harness.io/web-application-and-api-protection-waap-discovery-discovery-api-security-testing/installation/platform-agent/kubernetes/terraform.md) for details.

{% @harness-feedback/feedback %}
