-
Notifications
You must be signed in to change notification settings - Fork 3.7k
egressDeny policy doesn't block ClusterIP service traffic #39730
Copy link
Copy link
Closed
Labels
area/agentCilium agent related.Cilium agent related.area/proxyImpacts proxy components, including DNS, Kafka, Envoy and/or XDS servers.Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers.kind/bugThis is a bug in the Cilium logic.This is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.This was reported by a user in the Cilium community, eg via Slack.needs/triageThis issue requires triaging to establish severity and next steps.This issue requires triaging to establish severity and next steps.sig/policyImpacts whether traffic is allowed or denied based on user-defined policies.Impacts whether traffic is allowed or denied based on user-defined policies.
Metadata
Metadata
Assignees
Labels
area/agentCilium agent related.Cilium agent related.area/proxyImpacts proxy components, including DNS, Kafka, Envoy and/or XDS servers.Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers.kind/bugThis is a bug in the Cilium logic.This is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.This was reported by a user in the Cilium community, eg via Slack.needs/triageThis issue requires triaging to establish severity and next steps.This issue requires triaging to establish severity and next steps.sig/policyImpacts whether traffic is allowed or denied based on user-defined policies.Impacts whether traffic is allowed or denied based on user-defined policies.
Is there an existing issue for this?
Version
equal or higher than v1.17.4 and lower than v1.18.0
What happened?
Bug found when adding more test coverage (#39667). Essentially, the connectivity tests start failing if you just change IPFamilyAny to IPFamilyV4 at this line (which makes the test reach the service by its ClusterIP instead of the hostname). After a discussion with @gandro it doesn't look expected.
How can we reproduce the issue?
--set kubeProxyReplacement=true --set ingressController.enabled=true --set ingressController.loadbalancerMode=dedicated.cilium-cli connectivity test -vv --test 'pod-to-ingress-service-deny-backend-service/pod-to-ingress-service'to create the following services and pods:kubectl -n cilium-test-1 exec -it client-645b68dcf7-mzcxl -- /bin/sh -l.curl -vv cilium-ingress-same-node.cilium-test-1, by ClusterIP:curl -vv 10.99.170.106, by the pod IP:curl -vv 10.217.1.206:8080.kubectl -n cilium-test-1 apply -f cilium-cli/connectivity/builder/manifests/deny-ingress-backend.yaml.curl: (6) Could not resolve host: cilium-ingress-same-node.cilium-test-1— I'm not sure whether a DNS error is expected here), but it's still reachable by the ClusterIP of the service:curl -vv 10.99.170.106.Cilium Version
cilium-cli: v1.18.0-pre.2-352-g724043c0f0 compiled with go1.24.2 on linux/amd64
cilium image (default): v1.17.3
cilium image (stable): v1.17.4
cilium image (running): 1.18.0-dev
Kernel Version
Linux c3-small-x86-01-max2 6.15.0-rc4+ #51 SMP PREEMPT_DYNAMIC Tue May 6 15:47:28 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Kubernetes Version
Client Version: v1.32.4
Kustomize Version: v5.5.0
Server Version: v1.32.2
Regression
No response
Sysdump
cilium-sysdump-20250526-173222.zip
Relevant log output
Anything else?
No response
Cilium Users Document
Code of Conduct