Hi.
I'm experiencing some issues related to the setup on my home server. I have to admit that I am new to the whole Kubernetes thing, so please bear with me.
I'm using a headless Ubuntu Server with microk8s
and I am struggling to get it to work. I followed your Substack blog on how to deploy it, except I used the files from this repo instead of the snippets in the blog.
I enabled MetalLB and assigned the following ranges:
$ sudo microk8s enable metallb
Infer repository core for addon metallb
Enabling MetalLB
Enter each IP address range delimited by comma (e.g. '10.64.140.43-10.64.140.49,192.168.0.105-192.168.0.111'): 10.64.140.43-10.64.140.49,192.168.0.50-192.168.0.59
My home subnet is 192.168.0.0
; with my router being 192.168.0.1
, and my server being 192.168.0.102
. I access AGH's web UI using 192.168.0.102
with the port assigned from Kubernetes (31884
) and it works just fine. However, it seems like no traffic is being routed through to AGH...
The container seems to have connectivity, since SSHing into the box and executing these commands show the following output:
[Pinging through the deployment itself]
$ sudo microk8s kubectl exec -n adguard -it adguard-deployment-f9df4fb68-8x4kt -- ping 8.8.8.8
[sudo] password for [myuser]:
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=59 time=16.846 ms
64 bytes from 8.8.8.8: seq=1 ttl=59 time=16.530 ms
64 bytes from 8.8.8.8: seq=2 ttl=59 time=16.415 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 16.415/16.597/16.846 ms
[Getting the service and using both dig
and nslookup
]
$ sudo microk8s kubectl get service adguard-service -n adguard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
adguard-service LoadBalancer 10.152.183.181 10.64.140.43 3000:31099/TCP,80:31884/TCP,53:31239/UDP 36s
$ dig @10.64.140.43 google.com
; <<>> DiG 9.18.12-1ubuntu1.1-Ubuntu <<>> @10.64.140.43 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1433
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 122 IN A 142.250.74.174
;; Query time: 103 msec
;; SERVER: 10.64.140.43#53(10.64.140.43) (UDP)
;; WHEN: Sun Aug 13 16:25:24 UTC 2023
;; MSG SIZE rcvd: 55
$ nslookup yahoo.com 10.64.140.43
Server: 10.64.140.43
Address: 10.64.140.43#53
Non-authoritative answer:
Name: yahoo.com
Address: 74.6.231.20
Name: yahoo.com
Address: 54.161.105.65
Name: yahoo.com
Address: 74.6.143.26
Name: yahoo.com
Address: 74.6.143.25
Name: yahoo.com
Address: 34.225.127.72
Name: yahoo.com
Address: 98.137.11.164
Name: yahoo.com
Address: 98.137.11.163
Name: yahoo.com
Address: 74.6.231.21
Name: yahoo.com
Address: 2001:4998:124:1507::f001
Name: yahoo.com
Address: 2001:4998:24:120d::1:0
Name: yahoo.com
Address: 2001:4998:24:120d::1:1
Name: yahoo.com
Address: 2001:4998:44:3507::8000
Name: yahoo.com
Address: 2001:4998:44:3507::8001
Name: yahoo.com
Address: 2001:4998:124:1507::f000
[Getting the endpoints and pods, and executing nslookup
throught that IP]
$ sudo microk8s kubectl get endpoints adguard-service -n adguard
NAME ENDPOINTS AGE
adguard-service 10.1.242.66:53,10.1.242.66:3000,10.1.242.66:80 10h
$ sudo microk8s kubectl get pods -n adguard -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
adguard-deployment-f9df4fb68-8x4kt 1/1 Running 0 10h 10.1.242.66 homeserver <none> <none>
$ nslookup yahoo.com 10.1.242.66
Server: 10.1.242.66
Address: 10.1.242.66#53
Non-authoritative answer:
Name: yahoo.com
Address: 98.137.11.164
Name: yahoo.com
Address: 34.225.127.72
Name: yahoo.com
Address: 98.137.11.163
Name: yahoo.com
Address: 74.6.143.26
Name: yahoo.com
Address: 74.6.231.21
Name: yahoo.com
Address: 74.6.143.25
Name: yahoo.com
Address: 54.161.105.65
Name: yahoo.com
Address: 74.6.231.20
Name: yahoo.com
Address: 2001:4998:124:1507::f000
Name: yahoo.com
Address: 2001:4998:44:3507::8001
Name: yahoo.com
Address: 2001:4998:44:3507::8000
Name: yahoo.com
Address: 2001:4998:24:120d::1:1
Name: yahoo.com
Address: 2001:4998:24:120d::1:0
Name: yahoo.com
Address: 2001:4998:124:1507::f001
When I do lookups the queries get shown in AGH's web UI; however, setting the DHCP IP in my router's settings to point to 192.168.0.102
, 10.1.242.66
, or 10.64.140.43
does not seem to work. I'm confused; would you mind helping me sort this out? ๐