k3s icon indicating copy to clipboard operation
k3s copied to clipboard

NodePort does not accept IPv6 trafic

Open majkrzak opened this issue 5 years ago • 14 comments

When NodePort Service is created it is listening on all the interfaces but does not accept IPv6 traffic.

majkrzak avatar Aug 27 '19 20:08 majkrzak

Your environment is IPv6 single stack or dualstack (IPv6+IPv4)?

warmchang avatar Aug 28 '19 05:08 warmchang

Dualstack, non kubernetes services (ssh for example) works fine.

majkrzak avatar Aug 28 '19 05:08 majkrzak

When k3s service is down connections are rejected, but if ut is up then they stuck.

majkrzak avatar Aug 28 '19 05:08 majkrzak

The upstream k/k community is still working on IPv4/IPv6 dual-stack support, and the current release only supports single stack.

warmchang avatar Aug 28 '19 06:08 warmchang

It seems to bind interface correctly, but drops the packets later. No matter what it is not expe behavior and should be fixable quite easily, either by binding to v4 only or doing v6 in the proper way.

majkrzak avatar Aug 28 '19 06:08 majkrzak

Not sure if this is fixed with https://github.com/rancher/k3s/pull/750 or some other network related issue. If it is an easy fix tho PRs are welcome! ;)

erikwilson avatar Aug 28 '19 15:08 erikwilson

Sure, just please point me where NodePort traffic is handled

majkrzak avatar Aug 28 '19 17:08 majkrzak

If I knew where to point you I would likely just fix it myself. Looking through the logs of your setup might help. From that linked PR there may be some upstream dependency of socat that is causing issues.

erikwilson avatar Aug 28 '19 17:08 erikwilson

If you have some more info on what is happening that might help @majkrzak, such as steps to reproduce and host system information.

It isn't clear to me if this is an upstream k8s ipv6 issue or a problem with k3s specifically.

erikwilson avatar Aug 29 '19 23:08 erikwilson

It also doesn't work when externalIPs are specified. In netstat is visible that only ipv4 was bounded.

kind: Service
spec:
  type: NodePort
  externalIPs:
  - "111.111.111.111"
  - "1111:::::1"
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  - name: https
    port: 443
    protocol: TCP
    targetPort: https```

majkrzak avatar Sep 04 '19 18:09 majkrzak

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

stale[bot] avatar Jul 31 '21 10:07 stale[bot]

Still relevant

leoluk avatar Jul 31 '21 10:07 leoluk

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

stale[bot] avatar Jan 27 '22 10:01 stale[bot]

Hi. I don't know if this is still an issue, but in case of exposed services on DualStack Kuberenetes declares .spec.ipFamilyPolicy: SingleStack and it gives only the IPv4 service address; to force the service to be exposed on both IPv4 and IPv6 that policy should be configured as PreferDualStack or RequireDualStack.

rbrtbnfgl avatar Jul 21 '22 09:07 rbrtbnfgl

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

stale[bot] avatar Jan 17 '23 16:01 stale[bot]

Closing due to staleness

caroline-suse-rancher avatar Jun 21 '23 21:06 caroline-suse-rancher