-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
static ip addresses #7265
Comments
You should be able to create a pod with a static ip when you use |
Static IPv6 addresses are not yet supported. It should be easy to get them
working, just a matter of adding a flag and plumbing it through to CNI, but
I haven't managed to find the time.
…On Sun, Aug 9, 2020, 07:37 Luap99 ***@***.***> wrote:
You should be able to create a pod with a static ip when you use podman
pod create --ip ....
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCD7HJKS2ZCUGTHITODR72C7PANCNFSM4PZERGCQ>
.
|
Yes - this is what I thought too. But together with pod I always end up with this error message (as mentioned above): "Error: cannot set static IP or MAC address if not creating a network namespace: invalid argument" Maybe there is a way to do it and I am doing it wrong. In this case I would like to learn the way it should work. |
This means currently the way IPv6 is meant to be used in podman is with NAT (how else could I access a service if I don't know the IP it is using?). Working this way has some advantages: you can work with a single IP, you don't need to care about neighbor discovery,... Only thing which seems not "nice" to me working this way: normally IPv6 is not meant to be used with NAT. |
If you use a pod you cannot assign ip addresses to your containers since they all use the network namespace from the pod. The containers inside the pod all share the same interface and can talk via localhost to each other. |
Yes I saw that they use the same address and the same hostname. But even if they share the same IP - why can't I specify which IP this is? I mean a static IP for the pod. Is this possible? |
As stated before. All containers insides this pod will be reachable with the pod ip. |
This is possible, but you need to specify the static IP for the pod at time of creating the pod. |
OK. This works. I just ran a test. |
@fansari If there are no other questions, please close the issue |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
I found two scenarios where I still don't know how to assign static IPs to a container:
when the container belongs to a pod
when the IP address is IPv6
Steps to reproduce the issue:
podman run -d --pod new:web --name nginx --ip=10.88.0.8 -p 443:443/tcp nginx
podman run -d --name nginx --ip6=fd65:9803:9d93:4f1e::18 -p 443:443/tcp nginx
Describe the results you received:
Error: cannot set static IP or MAC address if not creating a network namespace: invalid argument
Error: unknown flag: --ip6
Describe the results you expected:
I thinks it should be possible to assign static IP addresses to containers even when they belong to pods of when the address is IPv6.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora CoreOS 32, VM
The text was updated successfully, but these errors were encountered: