# Office Hours: Upgrading to Telepresence 2
⚡️ DEMO: Telepresence 2 has new features like intercepts, preview URLs, collaboration capabilities, and VPN support. I’ll show you how to leverage these features in a live demo.
⚡️ A DEEP-DIVE INTO THE NEW ARCHITECTURE: We wanted to build a new Telepresence that better served Kubernetes teams, so we rewrote Telepresence in Go with a new architecture. I’ll talk through what the new architecture looks like and how it makes using Telepresence 2 different from Telepresence 1.
## Helpful links
GitHub open-source code base. We are aiming for full feature parity and for Telepresence 2 to take over as the primary version before Kubecon EU. (May 2nd)
[Telepresence 1 - Main branch](https://github.com/telepresenceio/telepresence)
[Telepresence 2 - release/v2](https://github.com/telepresenceio/telepresence/tree/release/v2)
[Whats new in T2](https://blog.getambassador.io/whats-new-in-telepresence-2-dbdff62b82d5)
* Architected for multiple users
* Faster to startup
* Is more reliable, with support for features such as re-connects
* Supports VPNs
## Command reference
[Client Reference for Telepresence 2](https://www.getambassador.io/docs/latest/telepresence/reference/client/)
## Demo
We are going to cover the following topics.
1. DNS resolution
2. Cluster Connectivity (Functionality of `--also-proxy`)
3. Intercepts (Formally `--swap-deployment`)
4. Subshells (Formally `--run-shell`)
5. Volume Mounts
6. Environment Variables
7. Preview URLs
### DNS Resolution
[DNS Resolution](https://www.getambassador.io/docs/latest/telepresence/reference/dns/)
1. FQDN
* `curl -ik https://kubernetes.default.svc.cluster.local`
2. Namespace
* `curl -ik https://kubernetes.default`
3. Direct during intercept
* `curl -ik https://kubernetes`
### Cluster Connectivity
[Proxy Outbound Traffic to My Cluster](https://www.getambassador.io/docs/latest/telepresence/howtos/outbound/#controlling-outbound-connectivity)
1. Mapped namespaces
* `telepresence connect --mapped-namespaces=orange,apple`
2. External dependencies (formally —also-proxy)
* [Services Type ExternalName](https://kubernetes.io/docs/concepts/services-networking/service/#externalname)
* `kubectl create service externalname a8r --external-name a8r.io`
* `ping a8r.default`
* `kubectl create service externalname googledns --external-name 8.8.4.4`
* `ping googledns.default`
3. Local only
* `telepresence intercept dataprocessingservice --namespace=apple --local-only -- ./main`
* `telepresence list -n apple`
### Intercepts
[Intercept a Service in Your Own Environment](https://www.getambassador.io/docs/latest/telepresence/howtos/intercepts/)
1. `telepresence intercept dataprocessingservice --port 3000`
### Volume Mounts
[Volume Mounts](https://www.getambassador.io/docs/latest/telepresence/reference/volume/)
1. `telepresence intercept nginx-deployment --port=80 --mount=true -- /bin/bash`
2. `telepresence intercept nginx-deployment --port=80 --mount=/tmp/ -- /bin/bash`
3. `env | grep TELE`
### Environment Variables
[Environment Variables](https://www.getambassador.io/docs/latest/telepresence/reference/environment/)
1. Env file
* `telepresence intercept envar-demo-container --port 8888 --env-file=these_vars`
2. Json file
* `telepresence intercept envar-demo-container --port 8888 --env-json=FILENAME`
3. Command
* `telepresence intercept envar-demo-container --port 8888 -- [COMMAND]`
4. Subshell
* `telepresence intercept envar-demo-container --port 8888 -- /bin/bash`
* `env | grep DEMO`
### Preview URLs
[Collaborate using Preview URLs | Ambassador](https://www.getambassador.io/docs/pre-release/telepresence/howtos/preview-urls/)
1. Telepresence login
2. Telepresence dashboard
3. Telepresence preview
4. Share my docker environment
## Architecture Deep Dive

(https://www.getambassador.io/docs/latest/telepresence/reference/architecture/)