Open dark-penguin opened 1 week ago
To fix at runtime:
kubectl patch -n kube-system daemonsets.apps "$(kubectl get -n kube-system daemonsets.apps | awk '/svclb/ {print $1;}')" -p '{"spec": {"template": {"spec": {"securityContext": {"sysctls": [{"name": "net.ipv4.ip_forward", "value": "1"}]}}}}}'
This is the easiest way I've found to remove the second item in that list, which is the problem:
- name: net.ipv6.conf.all.forwarding
value: "1"
Would it be possible to configure that to be done automatically?
If IPv6 support is disabled in the kernel, the guide does not work. After an investigation, I think I've found the problem:
svclb-traefik-3d8f13e3
stuck inContainerCreating
?.. Interesting. Let's see...So this is because I follow the best security practices and disable IPv6 support completely if I don't need it, especially in IoT, which is kinda one of the main targets for k3s. :slightly_smiling_face:
Is there maybe at least a way to configure the built-in svclb to not even try IPv6 ? :slightly_smiling_face:
What did you do
Exactly followed the first part of this guide: https://k3d.io/v5.7.3/usage/exposing_services/#1-via-ingress-recommended
How was the cluster created?
k3d cluster create --api-port 6550 -p "8081:80@loadbalancer" --agents 2
What did you do afterwards?
kubectl create deployment nginx --image=nginx
kubectl create service clusterip nginx --tcp=80:80
nano thatfile.yaml # Paste the YAML in the guide
kubectl apply -f thatfile.yaml
curl localhost:8081
What did you expect to happen
curl outputting the default Nginx HTML page
Actual output:
curl: (52) Empty reply from server
Which OS & Architecture
Which version of
k3d
Which version of docker