---
title: "Legacy sidecar capture fallback | Speedscale Docs"
description: "Configure proxy sidecar capture for existing installations and environments that cannot use the standard eBPF capture path."
canonical: "https://docs.speedscale.com/getting-started/installation/sidecar/install/"
---

[Documentation index](https://docs.speedscale.com/getting-started/llms.txt) | [Markdown](https://docs.speedscale.com/getting-started/installation/sidecar/install/index.md) | [Canonical page](https://docs.speedscale.com/getting-started/installation/sidecar/install/)

# Legacy sidecar capture fallback

Environment-specific fallback

For standard Kubernetes capture, follow [Kubernetes capture with eBPF and Java Agent](https://docs.speedscale.com/guides/capture/kubernetes/). Use this proxy sidecar workflow for existing sidecar deployments or environments that cannot meet the eBPF requirements. For a strict namespace-scoped installation without admission webhooks, use [namespaced sidecar capture](https://docs.speedscale.com/guides/capture/sidecar-namespaced/) instead of the annotation workflow below. Sidecar capture redirects application traffic and has its own permissions and TLS configuration.

In Kubernetes, Speedscale employs a sidecar (also known as `goproxy`) to capture network level traffic for individual services. The sidecar uses two server sockets to capture traffic:

*   Port 4143 - used to capture inbound traffic
*   Port 4140 - used to capture outbound traffic

The sidecar or init container uses these ports "intercept" traffic transparently. Here is a basic diagram that shows a client making a call to a service under test, and that service makes subsequent calls to other backend systems. Of course some calls may use an http port like 80 or 8080 (or pick your favorite port), other times the service may use https on port 443 and be using TLS traffic.

The Speedscale sidecar proxy, [goproxy](https://docs.speedscale.com/reference/glossary/#goproxy), is used to collect data from an existing application. To capture [traffic](https://docs.speedscale.com/reference/glossary/#traffic), requests to and from your application will need to be routed through the proxy.

tip

The [envoy](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/listeners/listeners#tcp) proxy (aka Istio) uses the same architecture to redirect traffic. Your platform or security team may already be familiar with this approach.

<a id="installation-fallback"></a>

## Installation (fallback)

There are several ways to install the sidecar in your cluster. See the [proxy configuration reference](https://docs.speedscale.com/reference/proxy_config/) for proxy configuration outside of a cluster.

**Web App**

From the [Speedscale web app](https://app.speedscale.com/) click on `Add service` to launch the add service wizard which will walk you through configuration and verification tailored to your environment.

**Kubernetes Annotation**

With cluster access you can add the sidecar with an annotation on your workload.

Please ensure the [Kubernetes Operator](https://docs.speedscale.com/getting-started/installation/install/kubernetes-operator/) is running in your cluster before moving on.

Select the workload (daemonset, deployment, statefulset, job or replicaset) you'd like to monitor and add the following annotation:

```yaml
annotations:
  sidecar.speedscale.com/inject: "true"
```

That's it. Next time you deploy you can check the pods with get pods.

```text
kubectl -n <namespace> get pods
```

You should notice your container count increases by one and data should be flowing.

```text
NAME                            READY   STATUS    RESTARTS   AGE
carts-xxxxxxxxxx-xxxxx          2/2     Running   0          38d
```

By default, the Speedscale init container starts after any existing init containers in the workload.

<a id="removal"></a>

## Removal

If you already have the sidecar installed, but you need for it to be removed, you may either set the `sidecar.speedscale.com/inject` annotation to `false`, or remove it:

```yaml
annotations:
  sidecar.speedscale.com/inject: "false"
```

After deploying or patching your deployment, you should notice your container count decrease by one and the sidecar is no longer attached.

Use `speedctl uninstall` to remove all Speedscale components.

<a id="permissions"></a>

## Permissions

When deploying the Speedscale sidecar and its init container, certain Kubernetes permissions are required to ensure proper functionality. Below are the permissions needed for both the init container and the sidecar.

<a id="sidecar-permissions"></a>

### Sidecar Permissions

The sidecar itself requires the following permissions:

```yaml
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        add:
        - NET_RAW
        - NET_ADMIN
      privileged: false
      runAsNonRoot: false
      runAsUser: 0
```

<a id="init-container-permissions"></a>

### Init Container Permissions

The init container requires the following security context settings:

```yaml
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        add:
        - NET_RAW
        - NET_ADMIN
      privileged: false
      runAsNonRoot: false
      runAsUser: 0
```

<a id="cluster-rbac"></a>

### Cluster RBAC

You can find the cluster RBAC settings by looking at the latest version of the Speedscale [helm chart](https://github.com/speedscale/operator-helm) in this file `/operator-helm/charts/<version>/templates/rbac.yaml`. The location of this file changes based on the version you are using but here is an [example](https://github.com/speedscale/operator-helm/blob/main/charts/2.3.636/templates/rbac.yaml) of the file for version 2.3.636.
