Open justinkillen opened 4 years ago
Image: quay.io/calico/node:v3.3.6
This is a really old version of Calico that isn't in support any longer. Could you try to reproduce this on a modern version and see if the issue persists?
Updated to v3.13.0 (per EKS CNI plugin link https://docs.aws.amazon.com/eks/latest/userguide/calico.html).
Same issue
@justinkillen just to double check, the Istio egress gateway is not host networked, correct?
It's EKS, using the AWS CNI
When Istio is installed and set for gateway TLS origination, a default deny-all NetworkPolicy does not block all traffic.
Based on https://istio.io/docs/tasks/traffic-management/egress/egress-gateway-tls-origination/ with tweaks for client https -> gateway tls passthrough
Expected Behavior
Traffic should be blocked; NetworkPolicy should be enforced
Current Behavior
Traffic is being allowed; NetworkPolicy is not being enforced
Possible Solution
If I add the policy and wait a long time with no traffic, then new traffic does get blocked as expected, so perhaps it's a cache / policy refresh issue?
Steps to Reproduce (for bugs)
Install Istio via: istioctl manifest apply --set values.gateways.enabled=true --set values.gateways.istio-ingressgateway.sds.enabled=true --set values.global.k8sIngress.enabled=true --set values.global.k8sIngress.enableHttps=true --set values.global.k8sIngress.gatewayName=ingressgateway --set values.kiali.enabled=true
Apply these resources:
Now, create a utility pod in a separate namespace, e.g.:
exec into the pod and run:
in a separate terminal, exec into the pod and run:
notice both are working as expected. If you look at the proxy logs, you'll see traffic being diverted from the pod to the egress gateway and then out to edition.cnn.com on port 443
Now, apply the following NetworkPolicy, which should block all inbound traffic to the egress gateway
You'll notice that the the https curl does in fact stop working as expected, but the http curl continues to work.
Reviewing the proxy logs, the flow stays the same: traffic being diverted from the pod to the egress gateway and then out to edition.cnn.com on port 443
Delete the NetworkPolicy, and https will start working again.
Context
Primary use cases is to apply egress restrictions to internal AWS EC2 microservices from components running in an AWS EKS cluster.
Your Environment
Calico daemonset info: Image: quay.io/calico/node:v3.3.6
Running in AWS EKS 1.15, using AWS provided images version 1.15.10-20200228. Node info (snippets): Labels: eks.amazonaws.com/nodegroup-image=ami-0582e4c984a1e848a System Info: Boot ID: 3b4adfb8-bd94-4f54-8d82-ac031550219d Kernel Version: 4.14.165-133.209.amzn2.x86_64 OS Image: Amazon Linux 2 Operating System: linux Architecture: amd64 Container Runtime Version: docker://18.9.9 Kubelet Version: v1.15.10-eks-bac369 Kube-Proxy Version: v1.15.10-eks-bac369