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.25] - coredns, metrics, nginx and snapshot validation services are always singleStack #4844

Closed
manuelbuil opened this issue Oct 5, 2023 · 1 comment
Assignees

Comments

@manuelbuil
Copy link
Contributor

Backport fix for coredns, metrics, nginx and snapshot validation services are always singleStack

@ShylajaDevadiga
Copy link
Contributor

Validated using rke2 version v1.26.10-rc2+rke2r1

Environment Details

Infrastructure
Cloud EC2 instance

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

Cluster Configuration:
3 server 1 agent

Config.yaml:

$ cat config.yaml 
node-ip: <IPv6>,<ipv4>
token: <TOKEN>
write-kubeconfig-mode: 644
cluster-cidr: 2001:cafe:42:0::/56,10.42.0.0/16
service-cidr: 2001:cafe:42:1::/112,10.43.0.0/16

Steps to reproduce the issue and validate the fix

  1. Copy config.yaml
  2. Install rke2

Validation results:
Services have ipv6 address, based on the order in node-ip flag in the config.yaml
Services have PreferDualStack as default
Pods have ipv6 as well as ipv4 address. kubectl displays it with ipv4 as mentioned here k3s-io/k3s#8598 (comment)

ubuntu@ip-192-168-28-30:~$ rke2 -v
rke2 version v1.25.15-rc3+rke2r1 (2ef1437e2223dc1f4c41bd52afde42e361d134aa)

go version go1.20.10 X:boringcrypto
ubuntu@ip-192-168-28-30:~$ kubectl get svc -A
NAMESPACE     NAME                                      TYPE        CLUSTER-IP             EXTERNAL-IP   PORT(S)         AGE
default       kubernetes                                ClusterIP   2001:cafe:42:1::1      <none>        443/TCP         11m
kube-system   rke2-coredns-rke2-coredns                 ClusterIP   2001:cafe:42:1::a      <none>        53/UDP,53/TCP   10m
kube-system   rke2-ingress-nginx-controller-admission   ClusterIP   2001:cafe:42:1::396d   <none>        443/TCP         9m53s
kube-system   rke2-metrics-server                       ClusterIP   2001:cafe:42:1::ec38   <none>        443/TCP         10m
kube-system   rke2-snapshot-validation-webhook          ClusterIP   2001:cafe:42:1::a55d   <none>        443/TCP         10m

ubuntu@ip-192-168-28-30:~$ kubectl describe svc -n kube-system    |grep  -i family -A4 -B2
Selector:          app.kubernetes.io/instance=rke2-coredns,app.kubernetes.io/name=rke2-coredns,k8s-app=kube-dns
Type:              ClusterIP
IP Family Policy:  PreferDualStack
IP Families:       IPv6,IPv4
IP:                2001:cafe:42:1::a
IPs:               2001:cafe:42:1::a,10.43.0.10
Port:              udp-53  53/UDP
--
Selector:          app.kubernetes.io/component=controller,app.kubernetes.io/instance=rke2-ingress-nginx,app.kubernetes.io/name=rke2-ingress-nginx
Type:              ClusterIP
IP Family Policy:  PreferDualStack
IP Families:       IPv6,IPv4
IP:                2001:cafe:42:1::396d
IPs:               2001:cafe:42:1::396d,10.43.108.127
Port:              https-webhook  443/TCP
--
Selector:          app=rke2-metrics-server,release=rke2-metrics-server
Type:              ClusterIP
IP Family Policy:  PreferDualStack
IP Families:       IPv6,IPv4
IP:                2001:cafe:42:1::ec38
IPs:               2001:cafe:42:1::ec38,10.43.19.222
Port:              <unset>  443/TCP
--
Selector:          app.kubernetes.io/instance=rke2-snapshot-validation-webhook,app.kubernetes.io/name=rke2-snapshot-validation-webhook
Type:              ClusterIP
IP Family Policy:  PreferDualStack
IP Families:       IPv6,IPv4
IP:                2001:cafe:42:1::a55d
IPs:               2001:cafe:42:1::a55d,10.43.119.229
Port:              https  443/TCP
ubuntu@ip-192-168-28-30:~$ 

 ubuntu@ip-192-168-28-30:~$ kubectl exec -it multitool-deployment-8487fd8b9f-k5xb7 bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
bash-5.1# ping 10.42.2.3
PING 10.42.2.3 (10.42.2.3) 56(84) bytes of data.
64 bytes from 10.42.2.3: icmp_seq=1 ttl=62 time=1.01 ms
64 bytes from 10.42.2.3: icmp_seq=2 ttl=62 time=0.378 ms
^C
--- 10.42.2.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.378/0.693/1.008/0.315 ms
bash-5.1# ping 10.42.3.3
PING 10.42.3.3 (10.42.3.3) 56(84) bytes of data.
64 bytes from 10.42.3.3: icmp_seq=1 ttl=62 time=6.04 ms
^C
--- 10.42.3.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 6.041/6.041/6.041/0.000 ms
bash-5.1# ping 2001:cafe:42:4::3
PING 2001:cafe:42:4::3(2001:cafe:42:4::3) 56 data bytes
64 bytes from 2001:cafe:42:4::3: icmp_seq=1 ttl=62 time=0.435 ms
64 bytes from 2001:cafe:42:4::3: icmp_seq=2 ttl=62 time=0.371 ms
^C
--- 2001:cafe:42:4::3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1022ms
rtt min/avg/max/mdev = 0.371/0.403/0.435/0.032 ms
bash-5.1# 

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

2 participants