-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Why can't access local node service using NodePort by eBPF mode on arm64 #6065
Comments
You are likely hitting this issue #5957, could you try with |
Thanks. I used the traditional manifest yaml install here. Any more guide to fix it. |
I checked the calico-node -bpf information, when I accessed the nodeport service from remote node: Here the local node IP is 10.169.210.108, remote node IP is 10.169.210.109. The NodePort is 31064. When I accessed the nodeport service locallly, it shows nothing: I also checked nat route map: |
Sorry, I forget to add it now runs on arm64, not amd64. |
Sorry, noticed that it is arm, but gave you a wrong image 😓 |
NP. I created a eBPF based e2e-test environment on arm64, which changed 2 files: But it seems the DNS resolution can't work in this environment:
|
I checked it on x86_64, it can work correctly. It seems the case of "can't access the local nodeport service" is only existed on arm64. |
If you exec into the calico-node pod and do |
We are still talking here that a host networked pod / the node itself is trying to connect to a nodeport / service right? |
Yes, here is just about the node itself is trying to connect to a nodeport service. |
I can't see any cgroup related cali programs on arm64. But they can be found on x86_64. |
I checked the logs of Calico-node pod, it seems the pinned map "cali_v4_ct_nats" leads progs can't attach to cgroup: |
I think I had found the root cause of this issue:
|
If you think my analysis is correct here, the issue can be closed. |
Sounds right, the fix wa also cherry-piched for 3.22.3 #6056 |
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:
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 80:31064/TCP 48m
From the node1:
<title>Welcome to nginx!</title> ...$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
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
The text was updated successfully, but these errors were encountered: