mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
docs: Rough notes for "services" docs with examples of internal DNS lookups and container ENV (#136)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# Internal DNS
|
||||
|
||||
Services can be addressed on the internal WireGuard network by service name, service ID, or a machine-scoped service name:
|
||||
|
||||
## Service name
|
||||
```
|
||||
$ nslookup nats.internal
|
||||
Server: 127.0.0.11
|
||||
Address: 127.0.0.11#53
|
||||
|
||||
Name: nats.internal
|
||||
Address: 10.210.0.2
|
||||
Name: nats.internal
|
||||
Address: 10.210.1.2
|
||||
```
|
||||
|
||||
```
|
||||
$ nslookup worker.internal
|
||||
Server: 127.0.0.11
|
||||
Address: 127.0.0.11#53
|
||||
|
||||
Name: worker.internal
|
||||
Address: 10.210.0.3
|
||||
Name: worker.internal
|
||||
Address: 10.210.0.4
|
||||
Name: worker.internal
|
||||
Address: 10.210.1.3
|
||||
Name: worker.internal
|
||||
Address: 10.210.1.4
|
||||
```
|
||||
|
||||
## Service ID
|
||||
```
|
||||
$ nslookup 3ecb3a8bbec5fd3f46efb056a934714a.internal
|
||||
Server: 127.0.0.11
|
||||
Address: 127.0.0.11#53
|
||||
|
||||
Name: 3ecb3a8bbec5fd3f46efb056a934714a.internal
|
||||
Address: 10.210.0.4
|
||||
```
|
||||
|
||||
## Machine ID scoped service name
|
||||
```
|
||||
$ nslookup 0903f0ee483aa97d559eeeaac5e22283.m.nats.internal
|
||||
Server: 127.0.0.11
|
||||
Address: 127.0.0.11#53
|
||||
|
||||
Name: nats.internal
|
||||
Address: 10.210.1.2
|
||||
```
|
||||
|
||||
```
|
||||
$ nslookup 0903f0ee483aa97d559eeeaac5e22283.m.worker.internal
|
||||
Server: 127.0.0.11
|
||||
Address: 127.0.0.11#53
|
||||
|
||||
Name: worker.internal
|
||||
Address: 10.210.1.3
|
||||
Name: worker.internal
|
||||
Address: 10.210.1.4
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
# Container ENV Variables
|
||||
|
||||
- `UNCLOUD_MACHINE_ID`
|
||||
- Machine ID the service container is running on.
|
||||
- Example: `UNCLOUD_MACHINE_ID=0903f0ee483aa97d559eeeaac5e22283`
|
||||
- `HOSTNAME`
|
||||
- Service name with unique suffix.
|
||||
- Example: `HOSTNAME=worker-c1zd`
|
||||
@@ -0,0 +1,4 @@
|
||||
label: Services
|
||||
collapsed: true # keep the category closed by default
|
||||
link:
|
||||
type: generated-index
|
||||
Reference in New Issue
Block a user