decoder-leco / plateforme

La plateforme de Data Engineering Décoder l'éco
0 stars 0 forks source link

Jupyterhub HTTPS with Letsencrypt + kubernetes external DNS cloudflare #6

Open Jean-Baptiste-Lasselle opened 6 months ago

Jean-Baptiste-Lasselle commented 6 months ago

Oh I stil need to solve one problem before that:

Network interfaces oin the VM :

pierre@first-test-vm:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc mq state UP group default qlen 1000
    link/ether 42:01:0a:80:00:02 brd ff:ff:ff:ff:ff:ff
    inet 10.128.0.2/32 brd 10.128.0.2 scope global dynamic enp0s0
       valid_lft 3003sec preferred_lft 3003sec
    inet6 fe80::4001:aff:fe80:2/64 scope link
       valid_lft forever preferred_lft forever
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:72:b9:d7:6b brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:72ff:feb9:d76b/64 scope link
       valid_lft forever preferred_lft forever
5: vethad6c47a@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether 02:73:5a:b9:f2:25 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::73:5aff:feb9:f225/64 scope link
       valid_lft forever preferred_lft forever
6: br-ac0439c42dfb: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:8c:83:ac:f5 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-ac0439c42dfb
       valid_lft forever preferred_lft forever
    inet6 fc00:f853:ccd:e793::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::42:8cff:fe83:acf5/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link

hm, hm... yep, there i think my only solution would be to use something more like a DDNS client like https://github.com/decoder-leco/plateforme/issues/5#issue-2317186510 but how can that DDNS client find out about the Ephemeral IP address that GCP assigns to my VM...?

Jean-Baptiste-Lasselle commented 6 months ago

Oh I think I know:

Jean-Baptiste-Lasselle commented 6 months ago

First test: let's test CLoudflare DDNS

Let's just test without digging too much, if the cloudflare ddns client will be able to discover my public ip...: https://github.com/decoder-leco/plateforme/issues/5

Jean-Baptiste-Lasselle commented 6 months ago

Writing a kubernetes controller quickly :

and there 's this a bit sloppy post : https://itnext.io/kubernetes-custom-controllers-recipes-for-beginners-bbc286c05ef8

Jean-Baptiste-Lasselle commented 5 months ago

ok i checked that i need to add a txt record to my dns, and i need topay on no-ip to be able to add txt record:

image