Skip to content

Commit

Permalink
(from getambassador.io) Revert "Revert "Merge pull request #443 from …
Browse files Browse the repository at this point in the history
…datawire/thallgren/namespace-access""

This reverts commit be1377292e0cd6df7135f347015d59ab6df5184a.
  • Loading branch information
LukeShu committed Feb 23, 2021
1 parent e167778 commit 09c7835
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions howtos/outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It is assumed that you have the demo web app from the [tutorial](../../tutorial/

## Proxying Outbound Traffic

Connecting to the cluster instead of running an intercept will allow you to access cluster deployments as if your laptop was another pod in the cluster. You will be able to access other Kubernetes services by their [full cluster DNS name](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#services) (`<servicename>.<namespace>.svc.cluster.local`), for example by curling a service from your terminal. A service running on your laptop will also be able to interact with other services on the cluster by name.
Connecting to the cluster instead of running an intercept will allow you to access cluster deployments as if your laptop was another pod in the cluster. You will be able to access other Kubernetes services using `<servicename>.<namespace>`, for example by curling a service from your terminal. A service running on your laptop will also be able to interact with other services on the cluster by name.

Connecting to the cluster starts the background daemon on your machine and installs the [Traffic Manager pod](../../reference/) into the cluster of your current `kubectl` context. The Traffic Manager handles the service proxying.

Expand All @@ -37,10 +37,10 @@ Connecting to the cluster starts the background daemon on your machine and insta
Intercepts: 0 total
```

1. Now try to access your service by name with `curl verylargejavaservice.default.svc.cluster.local:8080`. Telepresence will route the request to the cluster, as if your laptop is actually running in the cluster.
1. Now try to access your service by name with `curl verylargejavaservice.default:8080`. Telepresence will route the request to the cluster, as if your laptop is actually running in the cluster.

```
$ curl verylargejavaservice.default.svc.cluster.local:8080
$ curl verylargejavaservice.default:8080
<!DOCTYPE HTML>
<html>
<head>
Expand Down
8 changes: 4 additions & 4 deletions quick-start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Telepresence connects your local workstation to a remote Kubernetes cluster.
<Alert severity="info"> macOS users: If you receive an error when running Telepresence that the developer cannot be verified, open <b>System Preferences → Security & Privacy → General</b>. Click <b>Open Anyway</b> at the bottom to bypass the security block. Then retry the <code>telepresence connect</code> command.</Alert>

2. Test that Telepresence is working properly by connecting to the Kubernetes API server:
`curl -ik https://kubernetes.default.svc.cluster.local`
`curl -ik https://kubernetes.default`

```
$ curl -ik https://kubernetes.default.svc.cluster.local
$ curl -ik https://kubernetes.default
HTTP/1.1 401 Unauthorized
Cache-Control: no-cache, private
Expand Down Expand Up @@ -96,7 +96,7 @@ Your local workstation may not have the compute or memory resources necessary to
dataprocessingservice-5f6bfdcf7b-qvd27 1/1 Running 0 79s
```

3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default.svc.cluster.local:8080](http://verylargejavaservice.default.svc.cluster.local:8080).
3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default:8080](http://verylargejavaservice.default:8080).

4. You should see the EdgyCorp WebApp with a <span style="color:green" class="bold">green</span> title and <span style="color:green" class="bold">green</span> pod in the diagram.

Expand Down Expand Up @@ -227,4 +227,4 @@ Normal traffic coming to your app gets the <span style="color:green" class="bold

## <img class="os-logo" src="../../images/logo.png"/> What's Next?

<QSCards/>
<QSCards/>
8 changes: 4 additions & 4 deletions quick-start/qs-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Telepresence connects your local workstation to a remote Kubernetes cluster.
<Alert severity="info"> macOS users: If you receive an error when running Telepresence that the developer cannot be verified, open <b>System Preferences → Security & Privacy → General</b>. Click <b>Open Anyway</b> at the bottom to bypass the security block. Then retry the <code>telepresence connect</code> command.</Alert>

2. Test that Telepresence is working properly by connecting to the Kubernetes API server:
`curl -ik https://kubernetes.default.svc.cluster.local`
`curl -ik https://kubernetes.default`

```
$ curl -ik https://kubernetes.default.svc.cluster.local
$ curl -ik https://kubernetes.default
HTTP/1.1 401 Unauthorized
Cache-Control: no-cache, private
Expand Down Expand Up @@ -95,7 +95,7 @@ Your local workstation may not have the compute or memory resources necessary to
dataprocessingservice-5f6bfdcf7b-qvd27 1/1 Running 0 79s
```

3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default.svc.cluster.local:8080](http://verylargejavaservice.default.svc.cluster.local:8080).
3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default:8080](http://verylargejavaservice.default:8080).

4. You should see the EdgyCorp WebApp with a <span style="color:green" class="bold">green</span> title and <span style="color:green" class="bold">green</span> pod in the diagram.

Expand Down Expand Up @@ -222,4 +222,4 @@ Normal traffic coming to your app gets the <span style="color:green" class="bold

## <img class="os-logo" src="../../images/logo.png"/> What's Next?

<QSCards/>
<QSCards/>
6 changes: 3 additions & 3 deletions quick-start/qs-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Telepresence connects your local workstation to a remote Kubernetes cluster.
<Alert severity="info"> macOS users: If you receive an error when running Telepresence that the developer cannot be verified, open <b>System Preferences → Security & Privacy → General</b>. Click <b>Open Anyway</b> at the bottom to bypass the security block. Then retry the <code>telepresence connect</code> command.</Alert>

2. Test that Telepresence is working properly by connecting to the Kubernetes API server:
`curl -ik https://kubernetes.default.svc.cluster.local`
`curl -ik https://kubernetes.default`

```
$ curl -ik https://kubernetes.default.svc.cluster.local
$ curl -ik https://kubernetes.default
HTTP/1.1 401 Unauthorized
Cache-Control: no-cache, private
Expand Down Expand Up @@ -91,7 +91,7 @@ Your local workstation may not have the compute or memory resources necessary to
dataprocessingservice-5f6bfdcf7b-qvd27 1/1 Running 0 79s
```

3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default.svc.cluster.local:8080](http://verylargejavaservice.default.svc.cluster.local:8080).
3. Once all the pods are in a `Running` status, stop the `watch` command with `Ctrl+C`. Then go to the frontend service in your browser at [http://verylargejavaservice.default:8080](http://verylargejavaservice.default:8080).

4. You should see the EdgyCorp WebApp with a <span style="color:green" class="bold">green</span> title and <span style="color:green" class="bold">green</span> pod in the diagram.

Expand Down
8 changes: 4 additions & 4 deletions reference/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Telepresence DNS resolver is dynamically configured to resolve names using t

All intercepts contribute to the DNS resolver, even those that do not use the `--namespace=<value>` option. This is because `--namespace default` is implied, and in this context, `default` is treated just like any other namespace.

No namespaces are used by the DNS resolver (not even `default`) when no intercepts are active, which means that no service is available by `<svc-name>` only. Without an active intercept, the full DNS name must be used (in the form `<svc-name>.<namespace>.svc.cluster.local`).
No namespaces are used by the DNS resolver (not even `default`) when no intercepts are active, which means that no service is available by `<svc-name>` only. Without an active intercept, the namespace qualified DNS name must be used (in the form `<svc-name>.<namespace>`).

See this demonstrated below, using the [quick start's](../../quick-start/) sample app services.

Expand All @@ -31,7 +31,7 @@ $ curl verylargejavaservice:8080
This is expected as Telepresence cannot reach the service yet by short name without an active intercept in that namespace.

```
$ curl verylargejavaservice.default.svc.cluster.local:8080
$ curl verylargejavaservice.default:8080
<!DOCTYPE HTML>
<html>
Expand All @@ -40,7 +40,7 @@ $ curl verylargejavaservice.default.svc.cluster.local:8080
...
```

Using the full DNS name though does work.
Using the namespaced qualified DNS name though does work.
Now we'll start an intercept against another service in the same namespace. Remember, `--namespace default` is implied since it is not specified.

```
Expand All @@ -63,4 +63,4 @@ $ curl verylargejavaservice:8080

Now curling that service by its short name works and will as long as the intercept is active.

The DNS resolver will always be able to resolve services using `<service-name>.<namespace>.svc.cluster.local` regardless of intercepts.
The DNS resolver will always be able to resolve services using `<service-name>.<namespace>` regardless of intercepts.

0 comments on commit 09c7835

Please sign in to comment.