-
Notifications
You must be signed in to change notification settings - Fork 30
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
Network Policy Rule on Instance Metadata Endpoint #120
Comments
@atilsensalduz Does the Source IP in the above log map to a pod to which the policy is applied? Can you do a describe on corresponding |
What is your node agent version? Since I also see you are using |
Hey guys, @achevuru, I checked. When I describe policyendpoints of the network policy, I can see the IP of the pod in the logs. @jayanthvn, I am using the latest version of vpc-cni (v1.15.1) and the agent version is v1.0.4. Thanks for looking into this with me! |
@atilsensalduz not sure if your issue was resolved, but just noting that Network Policy agent v1.0.5 is now available with the latest VPC CNI version, v1.15.3 |
Hi @jdn5126 , I've updated the vpc-cni version and retested the connectivity, but it's still blocked. Interestingly, when I remove 169.254.169.254/32 from the 'except' block of the 'allow internet' rule, I can access the metadata endpoint. I expected the network policy to allow it with an explicit rule. Any ideas? |
@atilsensalduz Why do we have IMDS IP under except block of the second block? |
I'm using Helm to generate network policies, and one of the rules in the network policy template restricts internet access, which inadvertently prevents access to the metadata endpoint. To address this, I've added a separate rule for applications that genuinely require access to the metadata endpoint. 😄 |
Ok, I'm referring to IMDS IP being specified both in the allow and except blocks above (i.e.,) the below
|
thanks a bunch @achevuru "Deny always wins..." I like this quote. I might even consider getting it tattooed! 😄 |
Hi,
Despite having the following rules in the network policy definition, I've noticed DENY logs. Is there something specific to consider when utilizing the instance metadata endpoint?
Rule:
Here's an example log entry:
Node: ip-10-0-100-44.ec2.internal;SIP: 10.0.115.28;SPORT: 37758;DIP: 169.254.169.254;DPORT: 80;PROTOCOL: TCP;PolicyVerdict: DENY
Any insights would be appreciated
The text was updated successfully, but these errors were encountered: