# Kubernetes Security

# Introduction

One of Tutela’s features is the ability to ingest reports from the [Trivy Kubernetes Operator](https://aquasecurity.github.io/trivy-operator/latest/). This `k8s` operator runs every time there is a change in the `k8s` cluster (such as adding a container, role, node, etc…) and runs a variety of security checks on the added resource.


The security checks are then compiled into a report which is sent to Tutela for further processing.

In this walk-through we show how to set this up in Tutela.

# Getting Started


1. Login to Tutela
2. Navigate to **Settings**
3. Create a new **API Key** 

## `K8S` Operator setup

In this article we use `kubectl`. 

* Run the following commands

```bash
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/trivy-operator/v0.23.0/deploy/static/trivy-operator.yaml

kubectl get deployment -n trivy-system

# Ensure you see "trivy-operator" running in the output of the above command
# For logs: kubectl logs deployment/trivy-operator -n trivy-system

kubectl -- edit deployment trivy-operator -n trivy-system
```



:::tip
For alternative installation options please consult [the documentation](https://aquasecurity.github.io/trivy-operator/latest/getting-started/installation/)

:::


At this point a text editor will open and allow you to change the configuration of the `trivy-operator` deployment. We will add two environment variables that will instruct the deployment to start sending reports to Tutela.


Find the `env` section and add the below lines:

```yaml
- name: OPERATOR_WEBHOOK_BROADCAST_URL
  value: https://cs-vas-backend.cybersift.io/k8s/reportSubmission
- name: OPERATOR_WEBHOOK_BROADCAST_CUSTOM_HEADERS
  value: X-Tutela-API:<YOUR API KEY>
```


:::warning
:warning: **Trial Users**

```yaml
- name: OPERATOR_WEBHOOK_BROADCAST_URL
  value: https://trial-backend.tutela.cybersift.io/reportSubmission
- name: OPERATOR_WEBHOOK_BROADCAST_CUSTOM_HEADERS
  value: X-Tutela-API:<YOUR API KEY>
```

:::



---


:::info
tags:

* Tutela Kubernetes 
* K8S
* Trivy

:::

---

**Documents**

- [1. Getting Started](https://outline.cybersift.io/s/tutela-docs/doc/1-getting-started-wi972eTn7N)
- [2. Vulnerability Scanning](https://outline.cybersift.io/s/tutela-docs/doc/2-vulnerability-scanning-giL9tJRfit)
- [3. Asset Management](https://outline.cybersift.io/s/tutela-docs/doc/3-asset-management-TVe3GfeqgX)
- [4. Online Presence Monitoring](https://outline.cybersift.io/s/tutela-docs/doc/4-online-presence-monitoring-7dAIDIi6OT)
- [5. Reporting](https://outline.cybersift.io/s/tutela-docs/doc/5-reporting-xCbDsqRFGR)
- [6. Tutela Integrations](https://outline.cybersift.io/s/tutela-docs/doc/6-tutela-integrations-GJJVFdWlTI)
- [7. Porta](https://outline.cybersift.io/s/tutela-docs/doc/7-porta-0KQ0fvqN3u)
- [FAQ](https://outline.cybersift.io/s/tutela-docs/doc/faq-IkXHcKeIFy)