https://rancher.com/ logo
#rke2
Title
n

narrow-noon-75604

06/07/2022, 2:28 PM
Hi, I want to deploy rke2 with dual stack but could not able to find any references for config.yaml. can anyone please share me any reference links of config.yaml for dual stack configuration using calico network. This is the current configuration I am using,
Copy code
write-kubeconfig-mode: "0644"
tls-san:
  - "<http://master.167.254.204.58.nip.io|master.167.254.204.58.nip.io>"
node-label:
  - "nodetype=master"
cluster-cidr: "10.42.0.0/16"
service-cidr: "10.43.0.0/16"
cluster-dns: "10.43.0.10"
cluster-domain: "<http://master.xxx.xxx.xxx.xxx.nip.io|master.xxx.xxx.xxx.xxx.nip.io>"
cni:
  - calico
disable:
  - rke2-canal
  - rke2-kube-proxy
c

creamy-pencil-82913

06/07/2022, 3:24 PM
That looks fine. You just need to also specify ipv6 addresses for everything. What sort of problem are you running into?
n

narrow-noon-75604

06/07/2022, 3:33 PM
The "calico-system" pods are going into "CrashLoopBackOff" if I add the ipv6 addresses for "cluster-cidr" & "service-cidr" fields as below,
Copy code
cluster-cidr: "10.42.0.0/16,2001:cafe:42:0::/56"
service-cidr: "10.43.0.0/16,2001:cafe:42:1::/112"
I came across this github link that uses multiple fields like "node-ip", "kube-apiserver-arg" & "kube-controller-manager-arg", https://github.com/rancher/rke2/issues/870 Kindly let me know if I need to add any of those fields in "config.yaml" files of both server and agent nodes.
@creamy-pencil-82913 any suggestions on this please
b

bland-account-99790

06/07/2022, 4:59 PM
You should also specify a dual-stack node-ip
Kubelet is only capable of detecting one IP from your node
n

narrow-noon-75604

06/07/2022, 5:00 PM
I hope "node-ip" should be assigned with IPV4 and IPV6 addresses of the host, am I correct?
b

bland-account-99790

06/07/2022, 5:01 PM
yes
n

narrow-noon-75604

06/07/2022, 5:01 PM
should this be added in the config.yaml file of both server and agent configurations?
b

bland-account-99790

06/07/2022, 5:01 PM
let me give you an example
👍 1
Copy code
write-kubeconfig-mode: 644
token: "secret"
node-ip: 10.0.10.40,2a02:d011:a6f:4699:58c6:8609:a6d5:d1cb
cluster-cidr: 10.42.0.0/16,2001:cafe:42:0::/56
service-cidr: 10.43.0.0/16,2001:cafe:43:1::/112
where
10.0.10.40
and
2a02:d011:a6f:4699:58c6:8609:a6d5:d1cb
are the ips of the main interface of my node
If you want to add workers, they should include their node-ip parameter in their config too
the cluster-cidr and service-cidr is only needed for the server
n

narrow-noon-75604

06/07/2022, 5:03 PM
Thanks much for the detailed explanation @bland-account-99790
b

bland-account-99790

06/07/2022, 5:04 PM
Example for agent:
Copy code
server: "<https://10.0.10.40:9345>"
token: "secret"
node-ip: 10.0.10.41,2a05:d111:c6f:4a99:e30:945e:a70f:717e
👍 1
@narrow-noon-75604 Thanks for reporting this, I noticed that our rke2 docs are not explaining this. Something to improve
💯 1
67 Views