-
Notifications
You must be signed in to change notification settings - Fork 803
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
Controller reports as ready even though it is not able to connect to EC2 instance metadata #548
Comments
After we created aws-ebs-csi-driver component, we added a patch to Lokomotive, which deploys a Global Network Policy, which blocks access to EC2 Instance Metadata by default for all pods, which ended up breaking the component functionality. The issue was not spotted before, as the component does not have readiness probes defined, which has been reported upstream: kubernetes-sigs/aws-ebs-csi-driver#548 This commit fixes the component functionality, by adding the NetworkPolicy object selecting the controller pods, which unblocks all egress traffic for it, which bypasses the Global Network Policy. Closes #864 Signed-off-by: Mateusz Gozdek <[email protected]>
There is a livenessprobe https://github.com/kubernetes-csi/livenessprobe https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/deploy/kubernetes/base/controller.yaml#L60 , I am not sure if it can double as a readiness probe but that would probably solve this issue. |
@invidian I'm not able to reproduce this issue with the latest driver version v0.8.1. I'm using Calico as CNI and when the metadata service get blocked and deploy driver as usual, ebs-plugin container never becomes ready. |
@AndyXiangLi yes, I can reproduce it using v0.8.1. Do notice, that container is in |
Running:
does reproduce the issue. I would expect Helm to never converge.
|
/assign |
/kind bug
What happened?
When the controller pod not able to connect to EC2 instance metadata endpoint (for example, when it's blocked by the NetworkPolicy), the deployment still reports the container as a ready for some time, then pod crashes with the following error:
What you expected to happen?
ebs-plugin
container in controller pod should wait until it's connected to EC2 instance metadata before reporting the readiness to the Kubernetes.How to reproduce it (as minimally and precisely as possible)?
With Calico as CNI, create the following global network policy to block access to EC2 instance metadata:
Then, deploy the AWS EBS CSI driver as usual.
Anything else we need to know?:
It seems the deployment is currently missing readiness probes all together, so adding them is also needed to resolve this.
Environment
kubectl version
):The text was updated successfully, but these errors were encountered: