calico: Why can't access local node service using NodePort by eBPF mode on arm64
I have a 2 nodes k8s cluster. After enabling eBPF mode in Felix with guide(https://projectcalico.docs.tigera.io/maintenance/ebpf/enabling-bpf), I deployed a simple k8s Nodeport service and backend Nginx pods with replicas 2. It seems I can’t access the k8s nodeport service from local node itself, but it can be accessed from other nodes. I checked for the original behavior of kube-proxy, it can be accessed locally and correctly. So the 2 behaviors here are different. I wonder if there is any intentional design or setting here for disabling the local access for NodePort service with eBPF. or anything I had missed here for eBPF mode setting.
Steps to Reproduce
The deployment yaml file: trevor@vm3-arm-tx2-02:~/projects/k8s-cilium-examples$ cat nginx-app-deployment.yaml `apiVersion: v1 kind: Service metadata: name: nginx labels: app: nginx spec: type: NodePort ports:
- port: 80 protocol: TCP name: http selector: app: nginx
apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx role: backend spec: containers: - name: nginx image: nginx ports: - containerPort: 80`
The 2 nodes here: 10.169.210.108(node1), 10.169.210.109(node2) The generated k8s service: nginx NodePort 172.16.1.3 <none> 80:31064/TCP 48m
From the node1: $curl 10.169.210.108:31064 curl: (7) Failed to connect to 10.169.210.108 port 31064: Connection refused $ curl 10.169.210.109:31064
<!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> ...I checked with tcpdump:
sudo tcpdump -i any port 31064
The captured packets show a TCP RST ACK had been sent:
Calico version: 3.22.1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
I think I had found the root cause of this issue: