Skip to content
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

[BUG] Failed to get IPAM Config for network host #842

Closed
dreimsbach opened this issue Nov 8, 2021 · 2 comments · Fixed by #844
Closed

[BUG] Failed to get IPAM Config for network host #842

dreimsbach opened this issue Nov 8, 2021 · 2 comments · Fixed by #844
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dreimsbach
Copy link

What did you do

I want to use a k3d cluster with "host" network mode
k3d cluster create my-cluster --port 80:80@server:0:direct --port 443:443@server:0:direct --servers 1 --servers-memory=2g --no-lb --network host

With that, I receive this error

WARN[0000] No node filter specified
WARN[0000] No node filter specified
INFO[0000] Hostnetwork selected - disabling injection of docker host into the cluster, server load balancer and setting the api port to the k3s default
INFO[0000] Prep: Network
INFO[0000] Re-using existing network 'host' (91fd48d2f1909008a861ef1670927af8c53b8f30c767c7dff18d0e8c91f225d0)
INFO[0000] Created volume 'k3d-my-cluster-images'
INFO[0000] Starting new tools node...
INFO[0000] Starting Node 'k3d-my-cluster-tools'
INFO[0001] Creating node 'k3d-my-cluster-server-0'
INFO[0001] Deleted 6b19b8a555a2c782402866a1658f50b6cdd887eb79a3766c71750e2f69a5d682
INFO[0001] Using the k3d-tools node to gather environment information
INFO[0001] HostIP: using network gateway...
ERRO[0001] failed to gather environment information used for cluster creation: failed to get host IP: runtime failed to get host IP: failed to get gateway IP of docker network 'host': Failed to get IPAM Config for network host
ERRO[0001] Failed to create cluster >>> Rolling Back
INFO[0001] Deleting cluster 'my-cluster'
INFO[0001] Deleted k3d-my-cluster-server-0
ERRO[0001] docker failed to remove the container 'k3d-my-cluster-tools': Error response from daemon: removal of container k3d-my-cluster-tools is already in progress
INFO[0001] Deleting image volume 'k3d-my-cluster-images'
WARN[0001] Failed to delete image volume 'k3d-my-cluster-images' of cluster 'my-cluster': Try to delete it manually
FATA[0001] Cluster creation FAILED, all changes have been rolled back!

OS Debian 11
k3d version v5.0.3
k3s version v1.21.5-k3s2 (default)
Docker version 20.10.10, build b485636

@dreimsbach dreimsbach added the bug Something isn't working label Nov 8, 2021
@iwilltry42 iwilltry42 self-assigned this Nov 8, 2021
@iwilltry42 iwilltry42 added this to the v5.1.0 milestone Nov 8, 2021
@iwilltry42
Copy link
Member

Hi @dreimsbach , thanks for opening this issue!
Noting a few things here:

  • --port flags don't do anything in hostnetwork mode, as all ports of the container will be directly exposed onto your host
  • for hostnetwork mode, which only allows a single node anyway, you can also use k3d node create which wouldn't need e.g. the --no-lb flag
  • the error you're seeing there ultimately is a bug for real, that will be fixed and released in the v5.1.0 👍

@dreimsbach
Copy link
Author

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants