You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/uplink/create-tunnels.md
+48-20Lines changed: 48 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,27 @@
1
-
# Create a tunnel for a customer
1
+
# Create a tunnel
2
2
3
-
## Use separate namespaces for your tunnels
3
+
## Create a namespace for the tunnel
4
4
5
-
The `inlets` namespace contains the control plane for inlets uplink, so you'll need to create at least one additional namespace for your customer tunnels.
5
+
The `inlets` namespace contains the control plane for inlets uplink and should not be used to host tunnels.
6
6
7
-
1. Create a namespace per customer (recommended)
7
+
So you'll need to create at least one additional namespace for your tunnels.
8
+
9
+
=== "One namespace per tenant"
8
10
9
11
This approach avoids conflicts on names, and gives better isolation between tenants.
10
12
11
13
After creating the tunnel, you'll also need to label it `inlets.dev/uplink=1`
If you're using Istio, then you need to label each additional namespace to enable sidecar injection:
40
58
41
59
```bash
42
-
kubectl label namespace inlets \
60
+
export NS="tunnels"
61
+
62
+
kubectl label namespace $NS \
43
63
istio-injection=enabled --overwrite
44
64
```
45
65
46
66
## Create a Tunnel with an auto-generated token
47
67
48
-
`Tunnel` describes an inlets-uplink tunnel server. The specification describes a set of ports to use for TCP tunnels.
68
+
The `Tunnel`Custom Resource describes an inlets-uplink tunnel server. You can specify a reference to a pre-existing Kubernetes secret for the token, or have one generated for you.
49
69
50
-
For example the following Tunnel configuration sets up a http tunnel on port `8000` by default and adds port `8080` for use with TCP tunnels. The `licenceRef` needs to reference a secret containing an inlets-uplink license.
70
+
The below configures a tunnel for a customer called `acmeco` in the `tunnels` namespace. Port 8080 is exposed as a TCP tunnel, and the`licenceRef` needs to reference a secret containing an inlets-uplink license.
Once created, you can check the status of the tunnel, and you will see a secret was generated for the token.
95
+
96
+
```bash
97
+
kubectl get -n tunnels tunnel/acmeco
98
+
```
99
+
74
100
## Create a Tunnel with a pre-defined token
75
101
76
102
If you delete a Tunnel with an auto-generated token, and re-create it later, the token will change. So we recommend that you pre-define your tokens. This style works well for GitOps and automated deployments with Helm.
77
103
78
104
Make sure the secret is in the same namespace as the Tunnel Custom Resource.
79
105
80
-
You can use `openssl` to generate a secure token:
106
+
You can use `openssl` to generate a strong token:
81
107
82
108
```bash
83
109
openssl rand -base64 32 |tr -d '\n'> token.txt
@@ -105,14 +131,16 @@ spec:
105
131
licenseRef:
106
132
name: inlets-uplink-license
107
133
namespace: tunnels
108
-
tokenRef:
109
-
name: acmeco-token
110
-
namespace: tunnels
134
+
+ tokenRef:
135
+
+ name: acmeco-token
136
+
+ namespace: tunnels
111
137
tcpPorts:
112
138
- 8080
113
139
```
114
140
115
-
Clients can now connect to the tunnel using the custom token.
141
+
The `tokenRef` section is used to reference the secret containing the token.
142
+
143
+
Clients can now connect to the tunnel using the pre-defined token.
Copy file name to clipboardExpand all lines: docs/uplink/expose-tunnels.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Ingress for tunnels
1
+
# How to Expose Tunnels on the Internet
2
2
3
3
!!! info
4
4
@@ -8,8 +8,14 @@
8
8
9
9
Each inlets uplink tunnel is provisioned with a ClusterIP service that you can access internally within the cluster. The same service can be used to expose the tunnel to the public Internet using an Ingress resource. This approach is recommended for new users for dozens of tunnels.
10
10
11
+
[](/images/uplink/ingress-per-data-plane.png)
12
+
> Each tunnel's data-plane is exposed via a separate Ingress and Certificate
13
+
11
14
Alternatively, the data-router component can be used along with a wild-card DNS record and TLS certificate to expose many tunnels with a single Ingress record or Istio Gateway. This approach requires additional setup because the DNS01 challenge requires a special cert-manager Issuer with a secret for the DNS provider's API. It is recommended for users with many tunnels, but is more complex to setup.
12
15
16
+
[](/images/uplink/wildcard-ingressplane.png)
17
+
> A single certificate and Ingress record can be used for multiple tunnels
18
+
13
19
## Quick start
14
20
15
21
The instructions assume that you want to expose two HTTP tunnels. We will configure ingress for the first tunnel, called `grafana`, on the domain `grafana.example.com`. The second tunnel, called `openfaas`, will use the domain `openfaas.example.com`.
@@ -287,6 +293,8 @@ After applying these resources you should be able to access the data plane for b
287
293
288
294
As an alternative to creating individual sets of Ingress records, DNS A/CNAME entries and TLS certificates for each tunnel, you can use the `data-router` to route traffic to the correct tunnel based on the hostname. This approach uses a wildcard DNS entry and a single TLS certificate for all tunnels.
289
295
296
+
To enable the data-router, you will need to modify the values.yaml file you created during the [initial installation](/uplink/installation/) of the Inlets Uplink Helm chart.
297
+
290
298
The following example is adapted from the cert-manager documentation to use DigitalOcean's DNS servers, however you can find [instructions for issuers](https://cert-manager.io/docs/configuration/acme/dns01/) such as AWS Route53, Cloudflare, Google Cloud DNS, and AzureDNS being listed.
291
299
292
300
DNS01 challenges require a secret to be created containing the credentials for the DNS provider. The secret is referenced by the issuer resource.
Create a tunnel with an Ingress Domain specified in the `.Spec` field:
367
+
You can now create a new tunnel or modify an existing one and specify the hostname you want to use under the `ingressDomains` field. This field is an array and can take more than one hostname, depending on how many services you want to expose via the tunnel.
Copy file name to clipboardExpand all lines: docs/uplink/index.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,32 @@
2
2
3
3
!!! info "What's the difference between Inlets Pro and Inlets Uplink?"
4
4
5
-
Inlets Pro is a stand-alone binary that can be use to expose local HTTPs and TCP services on a remote machine or network.
5
+
Inlets Pro is a stand-alone binary that can be use to expose local HTTPs and TCP services on a remote machine or network. This is the easiest option for individuals and small teams.
6
6
7
-
Inlets Uplink is a complete management solution for tunnels for SaaS companiesand service providers. It's designed for scale, multi-tenancy and easy management.
7
+
Inlets Uplink is a complete management solution for tunnels for SaaS companies, infrastructure teams, and service providers. It's designed for scale, multi-tenancy and automation.
8
8
9
-
Inlets Uplink is our answer to the question: "How do you access customer services from within your own product?"
9
+
Inlets Uplink answers two primary questions:
10
10
11
-
You may consider building your own agent, using a AWS SQS queue, or a VPN.
11
+
1. "How do you access customer services from within your own product?"
12
+
2. "How to we provide tunnels as a managed service?"
12
13
13
-
The first two options involve considerable work both up front and in the long run. VPNs require firewall changes, specific network conditions, and lengthy paperwork.
14
+
In the first case, of accessing private customer services, you have have already considered building your own agent, using a queue, or a VPN.
14
15
15
-
Inlets Uplink uses a TLS encrypted websocket to make an outbound connection, and can also work over corporate HTTP proxies.
16
+
The first two options involve considerable work both up front and in the long run. VPNs require firewall changes, specific network conditions, additional paperwork, and can have prohibitive costs associated with them.
16
17
17
-
Here are some of the other differences between Inlets Pro and Inlets Uplink:
18
+
The Inlets Uplink runs inside a private network to connect to a public server endpoint using an outbound HTTP connection. Once established, the TLS-encrypted connection is upgraded to a websocket for bi-directional communication. This means it works over NAT, firewalls, and HTTP proxies.
18
19
19
-
* The management solution is built-in, self-hosted and runs on your Kubernetes cluster
20
+
Here are some of the other differences between stand-alone Inlets Pro and Inlets Uplink:
21
+
22
+
* The management solution is built-in, self-hosted and runs on your own Kubernetes cluster
20
23
* You can create a tunnel almost instantly via CLI, REST API or the "Tunnel" Custom Resource
21
-
* The license is installed on the server, instead of each client needing it
22
-
* TCP portscan be remapped to avoid conflicts
24
+
* The license is installed on the server, instead of being attached to the client, to make it easier to give out a connection command to customers and team members
25
+
*When exposing TCP ports, they can be remapped to avoid conflicts or needing privileged ports
23
26
* A single tunnel can expose HTTP and TCP at the same time
24
27
* All tunnels can be monitored centrally for reliability and usage
25
28
* By default all tunnels are private and only available for access by your own applications
26
-
27
-
With Uplink, you deploy tunnel servers for a customers to your Kubernetes cluster, and our operator takes care of everything else.
29
+
* Tunnels can also be managed through Helm, ArgoCD or Flux for a GitOps workflow
28
30
29
31
You can read more about why we created inlets uplink [in the product announcement](https://inlets.dev/blog/2022/11/16/service-provider-uplinks.html).
30
32
31
-
Reach out to us if you have questions: [Contact the inlets team](https://inlets.dev/contact)
33
+
Reach out to us if you have questions or would like to see a demo: [Contact the inlets team](https://inlets.dev/contact)
Copy file name to clipboardExpand all lines: docs/uplink/installation.md
+12-20Lines changed: 12 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
# Become an inlets uplink provider
1
+
# Install Inlets Uplink
2
2
3
-
inlets uplink makes it easy for Service Providers and SaaS companies to deliver their product and services to customer networks.
3
+
Inlets Uplink requires a Kubernetes cluster, and an inlets uplink subscription.
4
4
5
-
To become a provider, you'll need a Kubernetes cluster, an inletsuplink subscription and to install the inlets-uplink-provider Helm chart.
5
+
The installation is performed through a Helm chart (inlets-uplink-provider)) which is published as an OCI artifact in a container registry.
6
6
7
-
-[Read the Inlets Uplink announcement](https://inlets.dev/blog/2022/11/16/service-provider-uplinks.html)
7
+
The default installation keeps tunneled services private, with only the control-plane exposed to the public Internet. To expose the data-plane for one or more tunnels, after you've completed the installation, see the page [Expose tunnels](/uplink/expose-tunnels/).
8
8
9
9
## Before you start
10
10
11
11
Before you start, you'll need the following:
12
12
13
-
* A Kubernetes cluster with LoadBalancer capabilities (i.e. public cloud).
13
+
* A Kubernetes cluster where you can create a LoadBalancer i.e. a managed Kubernetes service like AWS EKS, Azure AKS, Google GKE, etc.
14
14
* A domain name clients can use to connect to the tunnel control plane.
15
15
* An inlets uplink license (an inlets-pro license cannot be used)
16
16
* Optional: [arkade](https://github.com/alexellis/arkade) - a tool for installing popular Kubernetes tools
@@ -21,25 +21,23 @@ Before you start, you'll need the following:
21
21
curl -sSLf https://get.arkade.dev/ | sudo sh
22
22
```
23
23
24
-
Inlets uplink has its own independent subscription from inlets-pro.
You can obtain a subscription for inlets uplink here: [inlets uplink plans](https://inlets.dev/pricing).
27
25
28
26
## Create a Kubernetes cluster
29
27
30
28
We recommend creating a Kubernetes cluster with a minimum of three nodes. Each node should have a minimum of 2GB of RAM and 2 CPU cores.
31
29
32
30
## Install cert-manager
33
31
34
-
Install [cert-manager](https://cert-manager.io/docs/), which is used to manage TLS certificates for inlets-uplink.
32
+
Install [cert-manager](https://cert-manager.io/docs/), which is used to manage TLS certificates for inlets-uplinkfor the control-plane and the REST API.
35
33
36
34
You can use Helm, or arkade:
37
35
38
36
```bash
39
37
arkade install cert-manager
40
38
```
41
39
42
-
## Create a namespace for the inlets-uplink-provider and install your license
40
+
## Create a namespace for the chart and add the license secret
43
41
44
42
Make sure to create the target namespace for you installation first.
Tunnels on your customers' network will connect to your own inlets-uplink-provider.
73
+
## Setup up Ingress for the control-plane
78
74
79
-
There are two options for deploying the inlets-uplink-provider.
75
+
Tunnel clients will connect to the client-router component which needs to be exposed via Ingress.
80
76
81
-
Use Option A if you're not sure, if your team already uses Istio or prefers Istio, use Option B.
77
+
You can use Kubernetes Ingress or Istio. We recommend using Ingress (Option A), unless your team or organisation is already using Istio (Option B).
82
78
83
79
### A) Install with Kubernetes Ingress
84
80
85
-
We recommend ingress-nginx, and have finely tuned the configuration to work well for the underlying websocket for inlets. That said, you can change the IngressController if you wish.
The configuration for a built-in issuer, and some ingress configuration has now moved up one level from the clientRouter, dataRouter, clientApi etc, to the top level of values.yaml. This is a breaking change and you will need to update your values.yaml file before upgrading the chart.
81
+
We recommend [ingress-nginx](https://github.com/kubernetes/ingress-nginx) for Ingress, and have finely tuned the configuration to work well for the underlying websocket for inlets. If your organisation uses a different Ingress Controller, you can alter the `class` fields in the chart.
By default, only the control-plane is made public, and the data-plane is kept private.
4
+
5
+
This suits two use-cases:
6
+
7
+
* A SaaS or Service Provider who needs to give customers a way to tunnel a private endpoint or service to their control plane
8
+
* An infrastructure team managing their own applications or services across multiple environments
9
+
10
+
Once the [tunnel client is connected](/uplink/connect-tunnel-client/), the data-plane of the tunnel can be access from within the Inlets Uplink control-plane cluster.
11
+
12
+
You can deploy your applications to the management Kubernetes Cluster, then access them via the tunnel's ClusterIP just like they were running directly within your cluster.
13
+
14
+
The traffic will go to the ClusterIP, which points at the tunnel server's data-plane ports, which then causes a connection to be dialed back to the client.
15
+
16
+
[](/images/uplink/no-external-ingress.png)
17
+
> Uplink with no external ingress or exposed tunnels
18
+
19
+
If you need external ingress for one or more tunnels, then you should see the [expose tunnels](/uplink/expose-tunnels/) page.
20
+
21
+
### Access a TCP service via ClusterIP
22
+
23
+
If you have forwarded a TCP service, then you can access it via the ClusterIP of the service.
24
+
25
+
Let's say that you port-forwarded SSH and remapped port 22 to 2222 to avoid needing to use any additional privileged for the tunnel server Pod:
26
+
27
+
```bash
28
+
kubectl run -t -i --rm tcp-access --image=ubuntu --restart=Never -- sh
29
+
```
30
+
31
+
Then from within the pod, you can access the service via the ClusterIP:
32
+
33
+
```bash
34
+
# apt update
35
+
# apt install -qy openssh-client
36
+
37
+
# ssh -p 2222 user@tunnel1.customer1
38
+
```
39
+
40
+
The address is made up of the tunnel name plus the namespace you used for the customer.
41
+
42
+
### Access a HTTP service via ClusterIP
43
+
44
+
If you have forwarded an HTTP service, then you can access it via the ClusterIP of the service, using port 8000.
45
+
46
+
If you have forwarded multiple HTTP endpoints, use the HTTP "Host" header to access one or the other.
47
+
48
+
```bash
49
+
kubectl run -t -i --rm http-access --image=ubuntu --restart=Never -- sh
50
+
```
51
+
52
+
Then from within the pod, you can access the service via the ClusterIP:
53
+
54
+
```bash
55
+
# apt update
56
+
# apt install -qy curl
57
+
58
+
# curl -i http://tunnel1.customer1:8000
59
+
```
60
+
61
+
To access a specific domain, use the HTTP "Host" header:
0 commit comments