Hi, I'm trying to setup dual-stack rke2 cluster. T...
# rke2
q
Hi, I'm trying to setup dual-stack rke2 cluster. The following is the config I'm using:
Copy code
write-kubeconfig-mode: "0644"
node-taint:
- node-role.kubernetes.io/control-plane:NoSchedule
cluster-cidr: 10.42.0.0/15,fd42::/56
service-cidr: 10.44.0.0/15,fd44::/112
cluster-dns: 10.44.0.10,fd44::10
egress-selector-mode: disabled
cni: cilium
enable-servicelb: true
ingress-controller: none
node-ip: <node-ipv4>,<node-ipv6>
node-external-ip: <node-ipv4>,<node-ipv6>
Inside the cluster, every other service get dual stack except the kube-apiserver ClusterIP service
Copy code
Name:           kubernetes
Namespace:        default
Labels:          component=apiserver
             provider=kubernetes
Annotations:       <none>
Selector:         <none>
Type:           ClusterIP
IP Family Policy:     SingleStack
IP Families:       IPv4
IP:            10.44.0.1
IPs:           10.44.0.1
Port:           https 443/TCP
TargetPort:        6443/TCP
Endpoints:        <node-ipv4>:6443
Session Affinity:     None
Internal Traffic Policy: Cluster
Events:          <none>
Should I set any additional flags to get dual stack for this service? There's additional flag to be added to the kube-apiserver mentioned on the kubernetes docs but I'm assuming that'll be passed on by rke2 server.
c
The apiserver in-cluster service endpoint is hardcoded by Kubernetes to be only single-stack, using the primary address family. This is an intentional choice by Kubernetes maintainers. You'd have to ask them why.
There is no way to make that service dual-stack.
q
Ah okay Thanks a lot for the reply. Haven't tried vanilla kubernetes with dual stack so didn't know upstream also has the same issue.