Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.23] In case of NodeIP not specified with dualstack setup K3S fails to start #5943

Closed
rbrtbnfgl opened this issue Aug 3, 2022 · 1 comment
Assignees
Milestone

Comments

@rbrtbnfgl
Copy link
Contributor

Backport for #5918

@mdrahman-suse
Copy link

mdrahman-suse commented Aug 10, 2022

Validated on 1.23 branch with commit d04af60

Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

Linux ip-192-168-7-155 5.15.0-1011-aws #14-Ubuntu SMP Wed Jun 1 20:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"

Cluster Configuration:

Single node

Config.yaml:

write-kubeconfig-mode: 644
token: summer
cluster-cidr: 10.42.0.0/16,2001:cafe:43:0::/56
service-cidr: 10.43.0.0/16,2001:cafe:44:1::/112
flannel-iface: "ens5"
disable-network-policy: true
flannel-ipv6-masq: true
cluster-init: true

Testing Steps

  1. Copy config.yaml
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
  1. Install k3s
  • For replication: curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.23.9+k3s1 sh -
  • For validation: curl -sfL https://get.k3s.io | INSTALL_K3S_COMMIT=d04af60aad053ec94e60c986bf4c70cdbfc9e11c sh -
  1. Ensure k3s cluster is up

Replication Results:

  • k3s version used for replication:
k3s version v1.23.9+k3s1 (f45cf326)
go version go1.17.5
  • The cluster does not come up as k3s fails to start and the below error is observed
$ journalctl -xeu k3s.service | grep 'cluster-cidr:'
Aug 10 05:13:53 ip-192-168-7-155 k3s[1865]: time="2022-08-10T05:13:53Z" level=fatal msg="cluster-cidr: [10.42.0.0/16 2001:cafe:43::/56] and node-ip: [192.168.7.155], must share the same IP version (IPv4, IPv6 or dual-stack)"
Aug 10 05:14:07 ip-192-168-7-155 k3s[1882]: time="2022-08-10T05:14:07Z" level=fatal msg="cluster-cidr: [10.42.0.0/16 2001:cafe:43::/56] and node-ip: [192.168.7.155], must share the same IP version (IPv4, IPv6 or dual-stack)"

Validation Results:

  • k3s version used for validation:
k3s version v1.23.9+k3s-d04af60a (d04af60a)
go version go1.17.5
  • The cluster comes up successfully and no error is observed
$ journalctl -xeu k3s.service | grep 'cluster-cidr:'

$ kubectl get nodes,pods -A -o wide
NAME                    STATUS   ROLES                       AGE   VERSION                INTERNAL-IP     EXTERNAL-IP   OS-IMAGE           KERNEL-VERSION    CONTAINER-RUNTIME
node/ip-192-168-7-155   Ready    control-plane,etcd,master   48s   v1.23.9+k3s-d04af60a   xxx.xxx.x.155   <none>        Ubuntu 22.04 LTS   5.15.0-1011-aws   containerd://1.5.13-k3s1

NAMESPACE     NAME                                          READY   STATUS      RESTARTS   AGE   
kube-system   pod/coredns-d76bd69b-jclws                    1/1     Running     0          39s   
kube-system   pod/helm-install-traefik-99wg4                0/1     Completed   2          39s   
kube-system   pod/helm-install-traefik-crd-87wbm            0/1     Completed   0          39s   
kube-system   pod/local-path-provisioner-6c79684f77-8lxwk   1/1     Running     0          39s   
kube-system   pod/metrics-server-7cd5fcb6b7-nf5c9           1/1     Running     0          39s   
kube-system   pod/svclb-traefik-150fb572-qstsp              2/2     Running     0          7s    
kube-system   pod/traefik-df4ff85d6-w4q4l                   0/1     Running     0          7s   

Additional context / logs:

  • Validated with ingress, hostport, nodeport and ran though dual-stack testing
  • Tested upgrade scenario (v1.23.9+k3s1 -> d04af60) and observed expected outcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants