Closed JaeGerW2016 closed 1 month ago
cilium lb list
#envoy-default-envoy-gateway-12b6bb46 loadbalancer ip 192.168.2.132
root@node1:~# kubectl exec -it -n kube-system cilium-fdcw7 -- cilium bpf lb list | grep "192.168.2.132"
Defaulted container "cilium-agent" out of: cilium-agent, mount-cgroup (init), apply-sysctl-overwrites (init), clean-cilium-state (init), install-cni-binaries (init)
192.168.2.132:80 (0) 0.0.0.0:0 (119) (0) [LoadBalancer, Local, two-scopes]
192.168.2.132:80 (1) 10.233.64.79:10080 (119) (1)
192.168.2.132:80/i (1) 10.233.64.79:10080 (120) (1)
192.168.2.132:80/i (0) 0.0.0.0:0 (120) (0) [LoadBalancer, Local, two-scopes]
#moon-lb-svc loadbalancer ip 192.168.2.130
root@node1:~# kubectl exec -it -n kube-system cilium-fdcw7 -- cilium bpf lb list | grep "192.168.2.130"
Defaulted container "cilium-agent" out of: cilium-agent, mount-cgroup (init), apply-sysctl-overwrites (init), clean-cilium-state (init), install-cni-binaries (init)
192.168.2.130:80 (1) 10.233.65.168:8080 (116) (1)
192.168.2.130:80 (0) 0.0.0.0:0 (116) (0) [LoadBalancer]
#pod/envoy-default-envoy-gateway-12b6bb46-cf6dfb77-ksbsq ip 10.233.64.79
root@node1:~# kubectl exec -it -n kube-system cilium-fdcw7 -- cilium bpf lb list | grep "10.233.64.79"
Defaulted container "cilium-agent" out of: cilium-agent, mount-cgroup (init), apply-sysctl-overwrites (init), clean-cilium-state (init), install-cni-binaries (init)
0.0.0.0:31895 (1) 10.233.64.79:10080 (123) (1)
10.233.4.1:80 (1) 10.233.64.79:10080 (118) (1)
192.168.2.132:80 (1) 10.233.64.79:10080 (119) (1)
0.0.0.0:31895/i (1) 10.233.64.79:10080 (124) (1)
192.168.2.220:31895/i (1) 10.233.64.79:10080 (122) (1)
192.168.2.132:80/i (1) 10.233.64.79:10080 (120) (1)
192.168.2.220:31895 (1) 10.233.64.79:10080 (121) (1)
Envoy GatewayClass Gateway HTTPRoute Info
root@node1:~# kubectl get gc
NAME CONTROLLER ACCEPTED AGE
envoy-gateway gateway.envoyproxy.io/gatewayclass-controller True 8d
root@node1:~# kubectl get gateways
NAME CLASS ADDRESS PROGRAMMED AGE
envoy-gateway envoy-gateway 192.168.2.132 True 8d
root@node1:~# kubectl get httproutes
NAME HOSTNAMES AGE
moon-svc 8d
root@node1:~# kubectl get httproutes moon-svc -oyaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"gateway.networking.k8s.io/v1","kind":"HTTPRoute","metadata":{"annotations":{},"name":"moon-svc","namespace":"default"},"spec":{"parentRefs":[{"name":"envoy-gateway"}],"rules":[{"backendRefs":[{"name":"moon-svc","port":80}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]}}
creationTimestamp: "2024-06-20T05:14:11Z"
generation: 1
name: moon-svc
namespace: default
resourceVersion: "2413037"
uid: cd4338af-b40f-4e34-97d8-f3cbfc837544
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway
rules:
- backendRefs:
- group: ""
kind: Service
name: moon-svc
port: 80
weight: 1
matches:
- path:
type: PathPrefix
value: /
status:
parents:
- conditions:
- lastTransitionTime: "2024-06-20T05:14:11Z"
message: Route is accepted
observedGeneration: 1
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2024-06-20T05:14:11Z"
message: Resolved all the Object references for the Route
observedGeneration: 1
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parentRef:
group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
@JaeGerW2016 can you help articulate why this is a Envoy Gateway issue and not a Cilium CNI issue ?
@JaeGerW2016 can you help articulate why this is a Envoy Gateway issue and not a Cilium CNI issue ?
The same Moon service binds the Envoy Proxy gateway and the Kubernetes built-in service through the Cilium CNI load balancer. The Kubernetes built-in service can normally publish to the outside of the cluster, but the gateway cannot. After checking the CNI LB list, it appears that after forwarding to the gateway’s port 10080, there is no forwarding to the backend.
In order to rule out that the issue with the Cilium CNI was causing the application to not be published, I used the Istio Gateway
CRD to deploy the same Moon service, and it was successful. Then, after redeploying the Envoy Gateway version v1.1.0
of the Gateway API, I was able to successfully exposed the application outside the Kubernetes cluster. Therefore, it seems that the issue was caused by a bug in version v1.0.2
of the Envoy Gateway.
Description: When using Cilium's L2 Announcement with ARP and migrate metallb to cilium CNI LoadBalancer mode, applications cannot be exposed outside the Kubernetes cluster. The applications can only be accessed within Kubernetes cluster nodes, but not from external devices.
v1.29.5
v1.15.6
v1.0.2
debian 12 bookworm
Steps to Reproduce
CiliumL2AnnouncementPolicy.yaml
lb-IPPool.yaml
the-moon-all-in-one-with-envoy-gateway.yaml
Expected Behavior
The application should be accessible from devices outside the Kubernetes cluster.
Actual Behavior
The application can only be accessed within Kubernetes cluster nodes, and external devices cannot access it.
Configuration Files and Logs
cilium config
envoy configuration
envoy-gateway logs