-
Notifications
You must be signed in to change notification settings - Fork 753
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
Can AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG
be generalized for multi-homed pods?
#2850
Comments
A single CNI plugin ideally shouldn't be configuring multiple interfaces for a pod and it is best that it is handled by chained plugins (that are paired with their own IPAM plugins). If you don't want to rely on Multus, you can just chain the CNI plugins in the config file. Also, why would a CNI plugin need to instantiate a K8S client? I don't think I understood the Q. At it's core, these are just general Linux container networking plugins and they have no specific dependency on K8S and the rpc interface you pointed out is between the CNI and it's IPAM plugin(aws-k8-agent). |
I see! Yes, this is a different requirement than mine.
So, let's say that I would want a second, third (aso) ENI attached to the node and that I would want to configure these interfaces the same way
It doesn't. I was trying (maybe poorly) to list the extensions I see required to support configuring multiple interfaces. The RPC interface possibly being one of them. AFAIU, the CNI should not configure multiple interfaces, so I'm not sure if this point is worth debating further. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
Closing this since it seems that either I'm way off mark here or extending the AWS-CNI the way I proposed is not desired. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
What happened:
I would like to have multi-homed pods without having to use multus. I come from a telecom background and this requirement comes from needing to implement data routers which sit in multiple subnets.
I know that I can use
AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG
to create a secondary network interface for the pod.I would like to understand better if it was ever considered to generalize this concept to support more than just a secondary network interface.
By looking at the code, this seems possible.
Could be extended to retrieve a list of v1alpha1.ENIConfigSpec. After which we iterate through them and allocate an ENI for each element in the list in tryAllocateENI.
routed-eni-cni-plugin
would need to create veth pairs for the extra ENIs attached on the node. Not every pod will need to be in the networks configured in custom networking. We would need to pass in configuration to therouted-eni-cni-plugin
for it to only assign IPs (and veth pairs) to the pods which need it. It’s still unclear what would be the best way to do this. Kubernetes annotations?Lastly, I see that the CNI plugin does not instantiate a kubernetes client, but instead sends RPC requests to
amazon-k8s-agent
.This API would probably need to be extended.
I would love to hear if you've ever considered this or if you see any major road blocks in developing such functionality.
Thanks!
Environment:
Not relevant to the question.
The text was updated successfully, but these errors were encountered: