You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client Version: v1.31.2+k3s1
Kustomize Version: v5.4.2
Server Version: v1.31.2+k3s1
Operation-system/Kernel Version
"Ubuntu 22.04.5 LTS"
5.15.0-125-generic
Description
Hello.
I want to use Kube-OVN's LoadBalancer in a Cilium Kube-Proxy Replacement environment.
The LoadBalancer type service I created as shown below is not working:
ubuntu@ubuntu:~/test-svc$ kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
lb-svc-podinfo-576656f7b-85hvd 1/1 Running 0 3m44s 10.16.0.11 ubuntu <none> <none>
podinfo-6bd97dfb99-rj4g6 1/1 Running 0 3m55s 10.16.0.9 ubuntu <none> <none>
podinfo-6bd97dfb99-t6rxd 1/1 Running 0 3m55s 10.16.0.10 ubuntu <none> <none>
ubuntu@ubuntu:~/test-svc$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 30m
podinfo LoadBalancer 10.43.5.219 192.168.0.62 9898:31442/TCP 3m49s
ubuntu@ubuntu:~/test-svc$
Ping works, but curl doesn't:
C:\Users\mune0>ping 192.168.0.61
Pinging 192.168.0.61 with 32 bytes of data:
Reply from 192.168.0.61: bytes=32 time<1ms TTL=64
Reply from 192.168.0.61: bytes=32 time<1ms TTL=64
Reply from 192.168.0.61: bytes=32 time<1ms TTL=64
Reply from 192.168.0.61: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.0.61:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\mune0>curl 192.168.0.61:9898
curl: (28) Failed to connect to 192.168.0.61 port 9898 after 21003 ms: Could not connect to server
ICMP (ping) works to the LoadBalancer IP (192.168.0.62), but TCP connection (curl) fails:
Ping to 192.168.0.62 succeeds
Curl to 192.168.0.62:9898 times out after 21 seconds
From tcpdump analysis:
SYN packets are being sent to both LoadBalancer IP (192.168.0.62:9898)
Traffic is being forwarded to the backend pod IP (10.16.0.9:9898)
No responses (SYN-ACK) are observed from either destination
Cilium service list shows:
LoadBalancer service is properly configured (ID 24)
Frontend IP is 192.168.0.62:9898
Two active backends: 10.16.0.10:9898 and 10.16.0.9:9898
NodePort services are also configured on port 31442
Expected Behavior
LoadBalancer Service should be fully functional:
TCP traffic to LoadBalancer IP (192.168.0.62:9898) should successfully reach the backend pods
Curl requests to 192.168.0.62:9898 should receive responses from the podinfo service
Service should properly load balance traffic between both backend pods (10.16.0.9 and 10.16.0.10)
Network flow should work as follows:
Client sends request to LoadBalancer IP
Request is properly routed through Cilium's load balancing
Backend pod receives the traffic and responds
Response packets successfully return to the client
Both Layer 3 (IP) and Layer 4 (TCP) connectivity should work:
Ping (ICMP) continues to work as it currently does
TCP connections should establish successfully
Full TCP handshake (SYN, SYN-ACK, ACK) should complete
The LoadBalancer service should provide the same functionality as if using the default kube-proxy, despite running in Cilium's kube-proxy replacement mode.
The text was updated successfully, but these errors were encountered:
Hey there, @MuNeNICK! I'm here to help you with any issues or questions you have. Let's work together to solve this bug!
The issue you're experiencing with the LoadBalancer service in a Cilium Kube-Proxy Replacement environment might be related to the integration between Kube-OVN and Cilium, especially in handling TCP connections. Here are some steps and considerations to help troubleshoot and potentially resolve the problem:
Check Kube-OVN and Cilium Compatibility: Ensure that the versions of Kube-OVN and Cilium you are using are compatible, especially with the kube-proxy replacement feature. There might be specific configurations or annotations required for them to work together, which are not detailed in the available documentation.
Review LoadBalancer Configuration: Double-check the annotations and configurations in your svc.yaml to ensure they are correctly set for the environment. The annotations related to logical switch and attachment provider should match the network setup.
Inspect Network Policies: If there are any network policies applied, ensure they allow traffic between the LoadBalancer IP and the backend pods. Network policies might inadvertently block the TCP traffic.
Use Kube-OVN Debugging Tools: Utilize the debugging tools provided by Kube-OVN to trace the network flow and identify where the packets might be getting dropped. You can use kubectl-ko commands to gather more insights:
kubectl ko trace <pod> <args...> to trace packets through the network.
kubectl ko log kube-ovn all to collect logs from all Kube-OVN components [1][2].
Check Cilium Logs and Debugging: Use Cilium's debugging tools to ensure that the service is correctly configured and that there are no issues with the load balancing or packet forwarding.
Verify DNAT Rules: Ensure that the DNAT rules are correctly set up in Kube-OVN for the LoadBalancer service. The rules should properly translate the external IP to the internal pod IPs [3].
If these steps do not resolve the issue, further investigation into the specific integration between Kube-OVN and Cilium might be necessary, as there could be undocumented compatibility issues or additional configuration requirements.
The LoadBalancer worked correctly in the integrated Kube-OVN and Cilium environment when not using Kube-Proxy Replacement mode, as shown in the following procedure.
Kube-OVN Version
v1.12.28
Cilium Version
1.16.3
Kubernetes Version
Client Version: v1.31.2+k3s1
Kustomize Version: v5.4.2
Server Version: v1.31.2+k3s1
Operation-system/Kernel Version
"Ubuntu 22.04.5 LTS"
5.15.0-125-generic
Description
Hello.
I want to use Kube-OVN's LoadBalancer in a Cilium Kube-Proxy Replacement environment.
The LoadBalancer type service I created as shown below is not working:
Ping works, but curl doesn't:
Here are the tcpdump results on the Node:
Here are the Cilium dbg results:
Steps To Reproduce
You can expand the following to check the environment setup commands.
Enviroment Setup Commands Here
k3s
cilium
kube-ovn
multus
external-network.yaml
deploymant.yaml
svc.yaml
Current Behavior
The current system behavior shows several issues:
Expected Behavior
The text was updated successfully, but these errors were encountered: