upstream dns-resolver
This commit is contained in:
parent
beff4a2c2f
commit
e2d319106f
18
README.md
18
README.md
@ -1,6 +1,7 @@
|
||||
# Snippets for k3s
|
||||
|
||||
* [Install k3s](#install-k3s)
|
||||
* [Configure upstream DNS-resolver](#upstream-dns-resolver)
|
||||
* [Namespaces and resource limits](#namespaces)
|
||||
* [devel](#namespace-devel)
|
||||
* [staging](#namespace-staging)
|
||||
@ -34,6 +35,19 @@ https://k3s.io/:
|
||||
curl -sfL https://get.k3s.io | sh -
|
||||
```
|
||||
|
||||
# Confiugure upstream DNS-resolver <a name="upstream-dns-resolver"></a>
|
||||
Default: 8.8.8.8
|
||||
1. local /etc/resolv.conf -> ip-of-dnsresolver (127.0.0.1 **does not work!**)
|
||||
2. vi /etc/systemd/system/k3s.service:
|
||||
```
|
||||
[...]
|
||||
ExecStart=/usr/local/bin/k3s \
|
||||
server --resolv-conf /etc/resolv.conf \
|
||||
```
|
||||
3. Re-load systemd config: `systemctl daemon-reload`
|
||||
4. Re-start k3s: `systemctl restart k3s.service`
|
||||
5. Re-deploy coredns-pods: `kubectl -n kube-system delete name-of-coredns-pods`
|
||||
|
||||
# Namespaces and resource limits <a name="namespaces"></a>
|
||||
## devel <a name="namespace-devel"></a>
|
||||
namespace-devel-limitranges.yaml:
|
||||
@ -137,7 +151,7 @@ spec:
|
||||
## Local provider (local - ouf-of-the-box) <a name="pv-local"></a>
|
||||
https://rancher.com/docs/k3s/latest/en/storage/
|
||||
|
||||
## Longhorn (lightweight/distributed) <a name="pv-longhorn"></a>
|
||||
## Longhorn provider (lightweight/distributed) <a name="pv-longhorn"></a>
|
||||
* Requirements: https://longhorn.io/docs/0.8.0/install/requirements/
|
||||
* Debian: `apt install open-iscsi`
|
||||
* Install: https://rancher.com/docs/k3s/latest/en/storage/
|
||||
@ -147,7 +161,7 @@ edit /etc/systemd/system/k3s.service:
|
||||
```
|
||||
[...]
|
||||
ExecStart=/usr/local/bin/k3s \
|
||||
server --disable traefik \
|
||||
server --disable traefik --resolv-conf /etc/resolv.conf \
|
||||
[...]
|
||||
```
|
||||
Finally `systemctl daemon-reload` and `systemctl restart k3s`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user