Skip to content

Commit 81a7876

Browse files
committed
Add a comparison between Telepresence and mirrord
Signed-off-by: Thomas Hallgren <[email protected]>
1 parent 8bffc00 commit 81a7876

File tree

4 files changed

+111
-27
lines changed

4 files changed

+111
-27
lines changed

versioned_docs/version-2.22/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ raw markdown version, more bells and whistles at [telepresence.io](https://telep
1919
- [Use Telepresence with Docker](howtos/docker.md)
2020
- [Work with large clusters](howtos/large-clusters.md)
2121
- [Host a cluster in Docker or a VM](howtos/cluster-in-vm.md)
22+
- [Use Telepresence with Azure (Microsoft Learn)](https://learn.microsoft.com/en-us/azure/aks/use-telepresence-aks.md)
2223
- Technical reference
2324
- [Architecture](reference/architecture.md)
2425
- [Client reference](reference/client.md)
@@ -38,6 +39,8 @@ raw markdown version, more bells and whistles at [telepresence.io](https://telep
3839
- [Networking through Virtual Network Interface](reference/tun-device.md)
3940
- [Connection Routing](reference/routing.md)
4041
- [Monitoring](reference/monitoring.md)
42+
- Comparisons
43+
- [Telepresence vs mirrord](compare/mirrord.md)
4144
- [FAQs](faqs.md)
4245
- [Troubleshooting](troubleshooting.md)
4346
- [Community](community.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: "Telepresence vs mirrord"
3+
hide_table_of_contents: true
4+
---
5+
6+
## Telepresence
7+
8+
Telepresence is a very feature rich tool, designed to handle a large majority of use-cases. You can use it as a cluster VPN only, or use one of its three different ways (replace, intercept, or ingest) to engage with the cluster's resources.
9+
10+
Telepresence is intended to be installed in the cluster by an administrator and then let clients connect with a very limited set of permissions. This model is generally required by larger companies.
11+
12+
The client can be either completely contained in Docker or run directly on the workstation. The latter will require the creation of a virtual network device, and hence admin access.
13+
14+
## mirrord
15+
16+
Mirrord was designed with simplicity in mind. You install the CLI tool, and that's it. It will do the rest automatically under the hood.
17+
18+
Mirrord solves the same problem as Telepresence, but in a different way. Instead of providing a proper network
19+
device and remotely mounted filesystems, mirrord will link the client application with a `mirrord-layer` shared library. This library will intercept accesses to the network, file system, and environment variables, and reroute them to a corresponding process in the cluster (the `mirrord-agent`) which then interacts with the targeted pod.
20+
21+
### Limitations
22+
23+
While mirrotd is simple to set up, the chosen approach has several limitations, both on the client and the cluster side.
24+
25+
### Limitations when using dynamic loading:
26+
27+
1. It will only work on Linux and macOS platforms. There's no native support on Windows.
28+
2. It will only work with dynamically linked executables.
29+
3. It cannot be used with docker unless you rebuild the container and inject the `mirrord-layer` into it.
30+
4. `DYLD_INSERT_LIBRARIES` causes various problems on macOS (SIP prevents it from being used), especially on silicon-based machines where mirrord will require Rosetta.
31+
5. Should Apple decide to protect their intel-based platform the same way as the silicon-based one in a future release, then mirrord will likely be problematic to use on that platform.
32+
33+
### Cluster Permissions
34+
35+
Mirrord does not require a sidecar. Instead they install a the `mirror-agent` into the namespace of the pod that it impersonates. That agent requires several permissions that a cluster admin might consider a security risk:
36+
37+
* `CAP_NET_ADMIN` and `CAP_NET_RAW` - required for modifying routing tables
38+
* `CAP_SYS_PTRACE` - required for reading target pod environment
39+
* `CAP_SYS_ADMIN` - required for joining target pod network namespace
40+
41+
Unless using "mirrord for Teams" (proprietary), all users must have permissions to create the job running the `mirror-agent` in the cluster.
42+
43+
## Comparison Telepresence vs mirrord
44+
45+
This comparison chart applies to the Open Source editions of both products.
46+
47+
| Feature | Telepresence | mirrord |
48+
|----------------------------------------------------------------------------|--------------|---------|
49+
| Run or Debug your cluster containers locally |||
50+
| Does not need administrative permission on workstation |[^1] ||
51+
| Can be used with very large clusters |||
52+
| Works without interrupting the remote service |[^2] ||
53+
| Doesn't require injection of a sidecar |[^3] ||
54+
| Supports connecting to clusters over a corporate VPN |||
55+
| Can intercept traffic |||
56+
| Can ingest a container |||
57+
| Can replace a container |||
58+
| Can mirror traffic |||
59+
| Can act as a cluster VPN only |||
60+
| Will work with statically linked binaries |||
61+
| Runs natively on windows |||
62+
| Can intercept traffic to and from pod's localhost |||
63+
| Remotely mounted file system available from all applications |||
64+
| Cluster network available to all applications (including browser) |||
65+
| Can run the same docker container locally without rebuilding it |||
66+
| Provides remote mounts as volumes in docker |||
67+
| Does not require special capabilities such as CAP_SYS_ADMIN in the cluster |||
68+
| Centralized client configuration using Helm chart |||
69+
| Installed using a JSON-schema validated Helm chart |||
70+
| Client need no special RBAC permissions |||
71+
72+
[^1]: Telepresence will not require root access on the workstation when running in docker mode.
73+
74+
[^2]: The remote service will only restart when a traffic-agent sidecar is installed. Pod disruption budgets or pre-installed agents can be used to avoid interruptions.
75+
76+
[^3]: A traffic-agent is necessary when engaging with a pod. It is unnecessary when using Telepresence as a VPN.

versioned_docs/version-2.22/doc-links.yml

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
link: reference/routing
6969
- title: Monitoring
7070
link: reference/monitoring
71+
- title: Comparisons
72+
items:
73+
- title: Telepresence vs mirrord
74+
link: compare/mirrord
7175
- title: FAQs
7276
link: faqs
7377
- title: Troubleshooting

versioned_docs/version-2.22/faqs.md

+28-27
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ hide_table_of_contents: true
66

77
# FAQs
88

9-
** Why Telepresence?**
9+
### Why Telepresence
1010

1111
Modern microservices-based applications that are deployed into Kubernetes often consist of tens or hundreds of services. The resource constraints and number of these services means that it is often difficult to impossible to run all of this on a local development machine, which makes fast development and debugging very challenging. The fast [inner development loop](concepts/devloop.md) from previous software projects is often a distant memory for cloud developers.
1212

13-
Telepresence enables you to connect your local development machine seamlessly to the cluster via a two way proxying mechanism. This enables you to code locally and run the majority of your services within a remote Kubernetes cluster -- which in the cloud means you have access to effectively unlimited resources.
13+
Telepresence enables you to connect your local development machine seamlessly to the cluster via a two-way proxying mechanism. This enables you to code locally and run the majority of your services within a remote Kubernetes cluster which in the cloud means you have access to effectively unlimited resources.
1414

1515
Ultimately, this empowers you to develop services locally and still test integrations with dependent services or data stores running in the remote cluster.
1616

@@ -22,79 +22,80 @@ You can also "intercept" any requests made to a service. This is similar to repl
2222

2323
Finally, you can "ingest" a service. Again, similar to a "replace", but nothing changes in the cluster during an "ingest", and no traffic is routed to the workstation.
2424

25-
** What operating systems does Telepresence work on?**
25+
#### What operating systems does Telepresence work on?
2626

27-
Telepresence currently works natively on macOS (Intel and Apple Silicon), Linux, and Windows.
27+
Telepresence currently works natively on macOS, Linux, and Windows.
2828

29-
** What protocols can be intercepted by Telepresence?**
29+
#### What architecture does Telepresence work on?
30+
31+
All Telepresence binaries are released for both AMD (Intel) and ARM (Apple Silicon) chips.
32+
33+
#### What protocols can be intercepted by Telepresence?
3034

3135
Both TCP and UDP are supported.
3236

33-
** When using Telepresence run a cluster service locally, are the Kubernetes cluster environment variables proxied on my local machine?**
37+
#### When using Telepresence to run a cluster service locally, are the Kubernetes cluster environment variables proxied on my local machine?
3438

3539
Yes, you can either set the container's environment variables on your machine or write the variables to a file to use with Docker or another build process. You can also directly pass the environments to a handler that runs locally. Please see [the environment variable reference doc](reference/environment.md) for more information.
3640

37-
** When using Telepresence to run a cluster service locally, can the associated container volume mounts also be mounted by my local machine?**
41+
#### When using Telepresence to run a cluster service locally, can the associated container volume mounts also be mounted by my local machine?
3842

39-
Yes, please see [the volume mounts reference doc](reference/volume.md) for more information.
43+
Yes, and when running Docker, they can be used as docker volumes. Please see [the volume mounts reference doc](reference/volume.md) for more information.
4044

41-
** When connected to a Kubernetes cluster via Telepresence, can I access cluster-based services via their DNS name?**
45+
#### When connected to a Kubernetes cluster via Telepresence, can I access cluster-based services via their DNS name?
4246

4347
Yes. After you have successfully connected to your cluster via `telepresence connect -n <my_service_namespace>` you will be able to access any service in the connected namespace in your cluster via their DNS name.
4448

4549
This means you can curl endpoints directly e.g. `curl <my_service_name>:8080/mypath`.
4650

4751
You can also access services in other namespaces using their namespaced qualified name, e.g.`curl <my_service_name>.<my_other_namespace>:8080/mypath`.
4852

49-
You can connect to databases or middleware running in the cluster, such as MySQL, PostgreSQL and RabbitMQ, via their service name.
53+
In essence, Telepresence makes the DNS of the connected namespace available locally. This means that you can connect to all databases or middleware running in the cluster, such as MySQL, PostgreSQL and RabbitMQ, via their service name.
5054

51-
** When connected to a Kubernetes cluster via Telepresence, can I access cloud-based services and data stores via their DNS name?**
55+
#### When connected to a Kubernetes cluster via Telepresence, can I access cloud-based services and data stores via their DNS name?
5256

5357
You can connect to cloud-based data stores and services that are directly addressable within the cluster (e.g. when using an [ExternalName](https://kubernetes.io/docs/concepts/services-networking/service/#externalname) Service type), such as AWS RDS, Google pub-sub, or Azure SQL Database.
5458

55-
56-
57-
58-
** Will Telepresence be able to engage with workloads running on a private cluster or cluster running within a virtual private cloud (VPC)?**
59+
#### Will Telepresence be able to engage with workloads running on a private cluster or cluster running within a virtual private cloud (VPC)?
5960

6061
Yes, but it doesn't need to have a publicly accessible IP address.
6162

6263
The cluster must also have access to an external registry to be able to download the traffic-manager and traffic-agent images that are deployed when connecting with Telepresence.
6364

64-
** Why does running Telepresence require sudo access for the local daemon unless it runs in a Docker container?**
65+
#### Why does running Telepresence require sudo access for the local daemon unless it runs in a Docker container?
6566

6667
The local daemon needs sudo to create a VIF (Virtual Network Interface) for outbound routing and DNS. Root access is needed to do that unless the daemon runs in a Docker container.
6768

68-
** What components get installed in the cluster when running Telepresence?**
69+
#### What components get installed in the cluster when running Telepresence?
6970

70-
A single `traffic-manager` service is deployed in the `ambassador` namespace within your cluster, and this manages resilient intercepts and connections between your local machine and the cluster.
71+
A `traffic-manager` service is deployed in a namespace of your choice (default 'ambassador') within your cluster, and this manages resilient intercepts and connections between your local machine and the cluster.
7172

72-
A Traffic Agent container is injected per pod that is being engaged. The first time a `replace`, an `ingest`, or an `intercept` is made on a workload, all pods associated with this workload will be restarted with the Traffic Agent automatically injected.
73+
A Traffic Agent container is injected per pod that is being engaged. The injection happens the first time a `replace`, an `ingest`, or an `intercept` is made on a workload, unless you choose to control the injection using an annotation, in which case the injection happens when the `traffic-manager` is installed.
7374

74-
** How can I remove all the Telepresence components installed within my cluster?**
75+
#### How can I remove all the Telepresence components installed within my cluster?
7576

7677
You can run the command `telepresence helm uninstall` to remove everything from the cluster, including the `traffic-manager`, and all the `traffic-agent` containers injected into each pod being engaged.
7778

79+
You also can run the command `telepresence uninstall <workload>` to remove the injected `traffic-agent` containers injected into each pod for that workload.
80+
7881
Also run `telepresence quit -s` to stop all local daemons running.
7982

80-
** What language is Telepresence written in?**
83+
#### What language is Telepresence written in?
8184

8285
All components of the Telepresence application and cluster components are written using Go.
8386

84-
** How does Telepresence connect and tunnel into the Kubernetes cluster?**
87+
#### How does Telepresence connect and tunnel into the Kubernetes cluster?
8588

8689
The connection between your laptop and cluster is established by using
8790
the `kubectl port-forward` machinery (though without actually spawning
8891
a separate program) to establish a TLS encrypted connection to Telepresence
8992
Traffic Manager and Traffic Agents in the cluster, and running Telepresence's custom VPN
9093
protocol over that connection.
9194

92-
<a name="idps"></a>
93-
94-
** Is Telepresence OSS open source?**
95+
#### Is Telepresence OSS open source?
9596

96-
Yes it is! You'll find both source code and documentation in the [Telepresence GitHub repository](https://github.com/telepresenceio/telepresence), licensed using the [apache License Version 2.0](https://github.com/telepresenceio/telepresence?tab=License-1-ov-file#readme).
97+
Yes, it is! You'll find both source code and documentation in the [Telepresence GitHub repository](https://github.com/telepresenceio/telepresence), licensed using the [apache License Version 2.0](https://github.com/telepresenceio/telepresence?tab=License-1-ov-file#readme).
9798

98-
** How do I share my feedback on Telepresence?**
99+
#### How do I share my feedback on Telepresence?
99100

100101
Your feedback is always appreciated and helps us build a product that provides as much value as possible for our community. You can chat with us directly on our #telepresence-oss channel at the [CNCF Slack](https://slack.cncf.io), and also report issues or create pull-requests on the GitHub repository.

0 commit comments

Comments
 (0)