IPv6 & Docker/k3s

No need to change docker-compose.yml. Every time I start the container in k3s it will get the latest version.

What is the exact error you got?

There is an issue: here you are trying http request on port 80.
But in your production.yaml, you have specified https: true.
This means that your server expects to use https, not http.

Http request should be redirected to https (by nginx, not by peertube). But the nginx configuration you shared listen only on http port (80).

I don’t know why it was working before, and why it does not work anymore.
But that’s what i can say regarding to all the information you shared: there are inconsistencies in your HTTP vs HTTPS configuration.
Maybe they are other issues, i don’t know. But this could explain that Peertube won’t load correctly in your browser.

Thanks for responding.

I am trying to solve the problem from inside to outside.

Internet → Nginx proxy in DMZ (IPv4 and IPv6) → internal netwerk (IPv6 only) → k3s pod with peertube.

What is the error?
Can you use the -v flag with your curl command, to have more info?

Inside k3s pod

curl -v http://localhost:9000
*   Trying 127.0.0.1:9000...
* connect to 127.0.0.1 port 9000 failed: Connection refused
*   Trying [::1]:9000...
* Connected to localhost (::1) port 9000 (#0)
> GET / HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 200 OK

internal network (IPv6 only)

curl -6 -v http://[XXXX:XXXX:XXXX:XXXX:XXXX::XXXX]
or
curl -v http://[XXXX:XXXX:XXXX:XXXX:XXXX::XXXX]

*   Trying [XXXX:XXXX:XXXX:XXXX:XXXX::XXXX]:80...
* connect to XXXX:XXXX:XXXX:XXXX:XXXX::XXXX port 80 from YYYY:YYYY:YYYY:YYYY::YYYY port 41756 failed: Keine Route zum Zielrechner
* Failed to connect to XXXX:XXXX:XXXX:XXXX:XXXX::XXXX port 80 after 3043 ms: Could not connect to server
* closing connection #0
curl: (7) Failed to connect to XXXX:XXXX:XXXX:XXXX:XXXX::XXXX port 80 after 3043 ms: Could not connect to server

It seems

So, it seems there is a route issue in your setup.

Thank you.

Inside the Pod (IPv6 & Docker/k3s - #25 par peertube_user) the first attemp to reach peertube is over IPv4. After the error curl is making a secound sucessfully attempt via IPv6.

Assuming that the same behavoir is from outside (IPv6 & Docker/k3s - #26 par peertube_user), but only trying non existing IPv4.

The address 2001:db8:: in this example is reserved for use in documentation. Replace it with a valid IPv6 network.

Thanks @JohnLivingston for your help!

a) redis IPv6

The workaround is to set the IPv6+PORT.

b) docker-compose.yml

The actual used IPv6 adress is reserved for use in documentation only.

@JohnLivingston

  • Peertube 7.0
  • production.yaml
listen:
  hostname: '::0'
  port: 9000
trust_proxy:
  - 'loopback'
  - '2001:cafe:42::1'

Use « ::0 » instead of « ::1 »
Use the k3s private range for trust_proxy.