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/reference/inlets-operator.md
+87-34Lines changed: 87 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,72 +4,125 @@ The [inlets/inlets-operator](https://github.com/inlets/inlets-operator) brings L
4
4
5
5
> It works by creating VMs and running an inlets Pro tunnel server for you, the VM's public IP is then attached to the cluster and an inlets client Pod runs for you.
6
6
7
-
You can install the inlets-operator using a single command with [arkade](https://arkade.dev/) or with helm. arkade is an open-source Kubernetes marketplace and easier to use.
8
-
9
7
For each provider, the minimum requirements tend to be:
10
8
11
9
* An access token - for the operator to create VMs for inlets Pro servers
12
10
* A region - where to create the VMs
13
11
12
+
**Helm or Arkade?**
13
+
14
+
You can install the inlets-operator's Helm chart using a single command with [arkade](https://arkade.dev/). arkade is an open-source Kubernetes marketplace and easy to use. Helm involves more commands, and is preferred by power users.
15
+
14
16
> You can [subscribe to inlets for personal or commercial use via Gumroad](https://inlets.dev/blog/2021/07/27/monthly-subscription.html)
15
17
16
-
## Install using arkade
18
+
## Tunnel Custom Resource Definition (CRD)
19
+
20
+
The inlets-operator uses a custom resource definition (CRD) to create tunnels. The CRD is called `Tunnel` and its full name is `tunnels.operator.inlets.dev`
21
+
22
+
```bash
23
+
$ kubectl get tunnels -n default
24
+
NAMESPACE NAME SERVICE HOSTSTATUS HOSTIP CREATED
25
+
default nginx-1-tunnel nginx-1 active 46.101.1.67 2m45s
26
+
```
27
+
28
+
The CRD can be used to view and monitor tunnels. The `HOSTSTATUS` field shows the status of the tunnel, and the `HOSTIP` field shows the public IP address of the tunnel.
29
+
30
+
The tunnel's IP address will also be written directly to any `Service` with a type of `LoadBalancer`.
The lifecycle of a tunnel is tied to the Service in Kubernetes.
40
+
41
+
To delete a tunnel permanently, you can delete the Service:
42
+
43
+
```bash
44
+
kubectl delete svc nginx-1
45
+
```
46
+
47
+
To have the tunnel server re-created, you can delete the tunnel CustomResource, this causes the operator to re-create the tunnel:
48
+
49
+
```bash
50
+
kubectl delete tunnel nginx-1-tunnel
51
+
```
52
+
53
+
### Working with another LoadBalancer
54
+
55
+
If you're running metal-lb or kube-vip to provide local IP addresses for LoadBalancer services, then you can annotate the services you wish to expose to the Internet with `operator.inlets.dev/manage=1`, then set `annotatedOnly: true` in the inlets-operator Helm chart.
56
+
57
+
## Install inlets-operator using arkade
17
58
18
59
```bash
60
+
export REGION=lon1
61
+
export PROVIDER=digitalocean
62
+
19
63
arkade install inlets-operator \
20
64
--provider $PROVIDER\ # Name of the cloud provider to provision the exit-node on.
21
65
--region $REGION\ # Used with cloud providers that require a region.
22
-
--zone $ZONE\ # Used with cloud providers that require zone (e.g. gce).
23
-
--token-file $HOME/Downloads/key.json # Token file/Service Account Key file with the access to the cloud provider.
66
+
--token-file $HOME/Downloads/do-access-token.txt # Token file/Service Account Key file with the access to the cloud provider.
24
67
```
25
68
26
-
## Install using helm
69
+
## Install inlets-operator using helm
27
70
28
-
Checkout the inlets-operator helm chart [README](https://github.com/inlets/inlets-operator/blob/master/chart/inlets-operator/README.md) to know more about the values that can be passed to `--set` and to see provider specific example commands.
71
+
The following instructions are a generic example, you should refer to each specific heading to understand how to create the required API keys for a given cloud provider.
29
72
30
-
```bash
31
-
# Create a secret to store the service account key file
32
-
kubectl create secret generic inlets-access-key \
33
-
--from-file=inlets-access-key=key.json
73
+
* Some providers require an access key, others also need a secret key.
74
+
* Some providers only use a region, others use a zone and projectID too.
75
+
* There are additional flags you can set via values.yaml or the `--set` flag.
Install with inlets Pro on [DigitalOcean](https://m.do.co/c/8d4e75e9886f).
112
+
The [DigitalOcean](https://m.do.co/c/8d4e75e9886f) provider is fast, cost effective and easy to set it. It's recommended for most users.
113
+
114
+
Create an API access token with full read/write permissions and save it to: `$HOME/Downloads/do-access-token.txt`.
62
115
63
-
Assuming you have created an API key and saved it to `$HOME/Downloads/do-access-token`, run:
116
+
Now, install the chart with arkade using the above options:
64
117
65
118
```bash
66
119
arkade install inlets-operator \
67
120
--provider digitalocean \
68
121
--region lon1 \
69
-
--token-file $HOME/Downloads/do-access-token
122
+
--token-file $HOME/Downloads/do-access-token.txt
70
123
```
71
124
72
-
If you have `doctl` installed, you can list the available regions and see whether they have available capacity to launch a new VM.
125
+
If you have the DigitalOcean CLI (`doctl`) installed, then you can use it to list available regions and their codes to input into the above command. Bear in mind that some regions are showing no availability for starting new VMs.
73
126
74
127
```bash
75
128
doctl compute region ls
@@ -153,18 +206,18 @@ The below commands will create a set of credentials and save them into files for
153
206
154
207
```bash
155
208
ACCESS_KEY_JSON=$(aws iam create-access-key --user-name inlets-automation)
0 commit comments