# Istio

### Register the Metering Beacon <a href="#user-content-register-the-metering-beacon" id="user-content-register-the-metering-beacon"></a>

```
kubectl apply -f revenium-metering-external-service.yaml
```

{% hint style="success" %}
The Revenium Istio Plugin files can be obtained from your Revenium Account Team.
{% endhint %}

### Determine the Egress Envoy Cluster Name for the Metering Beacon <a href="#user-content-determine-the-egress-envoy-cluster-name-for-the-metering-beacon" id="user-content-determine-the-egress-envoy-cluster-name-for-the-metering-beacon"></a>

This is a bit tricky as we need the name of the Envoy cluster to send traffic upstream from Envoy. General syntax is something like this:

```
proxy-config cluster <POD_NAME> -o json | awk '/outbound/ && /<METERING URL>/' | awk '{print $2}' | | sed -E -e 's/\"|\,//g'
```

ie,

```
proxy-config cluster echo-v1-5599868c75-2mdn7 -o json | awk '/outbound/ && /foo/' | awk '{print $2}' | sed -E -e 's/\"|\,//g'
```

### Configure the Envoy Filter <a href="#user-content-configure-the-envoy-filter" id="user-content-configure-the-envoy-filter"></a>

Open revenium-envoy-filter.yaml and edit the following:

* revenium\_api\_id
* revenium\_envoy\_cluster\_name

Then apply the configuration:

```
kubectl apply -f profitstream-envoy-filter.yaml
```
