-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
support container network aliases #7870
Comments
@baude This looks like something that the dns-CNI PLugin would need to handle? |
nope, i dont think so. in fact, i dont think we can do this with our current container architecture. @mheon do I remember that correctly? |
I think we can but it would be a fair amount of effort to get it working - maybe a week or two of time for me or someone else who knows the network code well. |
Also, there's going to be an unavoidable connection drop when we do add the new network, I think (we basically need to have CNI tear down and then recreate the network) |
My use for |
I would say that aliases are more difficult to implement than |
Of course if the community wanted to work on a PR, we would love to see it. |
Without @rhatdan I hope someone takes this on, unfortunately I can't volunteer because I don't speak any |
Are you sure about that? I'm fairly certain that we run per-network DNS instances, so we effectively namespace container names by the network they're attached to? @baude can confirm. |
The clash is at the container name level:
|
Would --hostname fix this? |
I tried that. This sets the hostname for the host itself. It isn't added as a name to the DNS so other containers can resolve it. |
For my use-case either of these could work: Providing the alias on
Providing the alias post
|
This is being worked on now by myself and @baude |
merged upstream today ... closing |
@mheon I'm trying this out. Is it supposed to work rootless? That's how I want to use it. I have:
And this doesn't work for me (unless when I run it as root).
|
Rootless needs an upgrade to the CNI infra image - we're discussing changes to said image right now (moving towards using content from the host, so you wouldn't need to upgrade the infra container when you upgraded CNI and dnsname). So this is root-only for now while we build a better way to handle it as rootless. |
Is there an issue that I can follow to know when this may work rootless? |
Allow to set network aliases for containers.
Either providing the alias on docker run:
Or providing the alias post docker run:
The text was updated successfully, but these errors were encountered: