k0s icon indicating copy to clipboard operation
k0s copied to clipboard

Run k0s only with IPv6

Open FallingSnow opened this issue 2 years ago • 1 comments

Before creating an issue, make sure you've checked the following:

  • [X] You are running the latest released version of k0s
  • [X] Make sure you've searched for existing issues, both open and closed
  • [X] Make sure you've searched for PRs too, a fix might've been merged already
  • [X] You're looking at docs for the released version, "main" branch docs are usually ahead of released versions.

Version

v1.23.6+k0s.1

Platform

$ uname -a
Linux [redacted] 5.15.37-0-lts #1-Alpine SMP Tue, 03 May 2022 11:42:03 +0000 x86_64 Linux


### What happened?

Trying to setup k0s in a ipv6 only mode. I've enabled the `dualStack` option in `k0s.yaml` and commented out `podCIDR` and `serviceCIDR`.  etcd doesn't seem to want to use IPv6 and defaults to 127.0.0.1:2379 which it can't reach... See logs below.

### Steps to reproduce

1. Create config file via `k0s config create`.
2. Enable dual stack and comment out ipv4 options.
3. Install node via `k0s install controller --single -c k0s.yaml`
4. Try to start node via `k0s start`
5. View errors in error log


### Expected behavior

Start k0s node and view status ready from `k0s status`.

### Actual behavior

After k0s start there is a long pause after running `k0s status` followed by an error message.

$ k0s status Error: Get "http://localhost": read unix @->/run/k0s/status.sock: read: connection reset by peer


### Screenshots and logs

2022/05/12 19:28:21 [INFO] received CSR 2022/05/12 19:28:21 [INFO] generating key: rsa-2048 2022/05/12 19:28:21 [INFO] generating key: rsa-2048 2022/05/12 19:28:21 [INFO] encoded CSR 2022/05/12 19:28:21 [INFO] signed certificate with serial number 34077467088199800677703379480408051859706481148 2022/05/12 19:28:21 [INFO] encoded CSR 2022/05/12 19:28:21 [INFO] signed certificate with serial number 367689976193851586584829867088919234884365302966 2022/05/12 19:28:21 [INFO] encoded CSR 2022/05/12 19:28:21 [INFO] signed certificate with serial number 662805092721056951592517630606255691338362636976 {"level":"warn","ts":"2022-05-12T19:28:22.986Z","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000bac1c0/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused""} {"level":"warn","ts":"2022-05-12T19:28:23.987Z","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000b7fc00/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused""} {"level":"warn","ts":"2022-05-12T19:28:24.988Z","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000b22a80/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused""}


### Additional context

_No response_

FallingSnow avatar May 12 '22 19:05 FallingSnow

Thank you for this submission! K0s was never tested in IPv6 mode only (only in dual stack mode). We'll have to take a deeper look at how to enable pure IPV6 for all the nested components. I've added this issue to the backlog so we can take a look at the requirements needed in order to enable IPV6 mode.

trawler avatar May 16 '22 12:05 trawler