for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Can not access local network, with kubernetes installed

Open ghost opened this issue 7 years ago • 45 comments

The kubernetes will create cni0 network, and insert a route table

10.1.0.0

but our local network was defined with 10.1.0.0.

so we can not access our local network.

such as docker login 10.1.41.29:5555

will failed.

would you please allow us to set the kubernetes network range?

ghost avatar Feb 07 '18 08:02 ghost

For the moment, there is no parameter for that but here is a work-around.

  1. Disable Kubernetes
  2. docker run -it --privileged --pid=host justincormack/nsenter1 and edit /var/lib/cni/conf/10-default.conflist. Change 10.1.0.0/16 mention by the network you want. Don't forget the gateway and the dns.
  3. Enable Kubernetes

Let me know if it works!

guillaumerose avatar Feb 21 '18 15:02 guillaumerose

Thanks a lot

ghost avatar Feb 22 '18 00:02 ghost

@guillaumerose is there anyway this could be added as UI option or maybe some other network that might not conflict as much as 10.1.0.0 default? Also what causes this to reset? I ran into this issue again today and totally forgot what I did to fix it until I managed to find this issue via Google ;-)

cdenneen avatar Mar 15 '18 00:03 cdenneen

I think the reset is caused by a reset of the images disk or an upgrade.

We need to add this as a parameter, we are just running out of time.

guillaumerose avatar Mar 15 '18 08:03 guillaumerose

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Jul 30 '18 23:07 docker-robott

Is there anyway to get this added. I keep k8s disabled as manually fixing after each Update has been frustrating but would really like to use k8s locally.

/lifecycle frozen

cdenneen avatar Jul 31 '18 00:07 cdenneen

@guillaumerose this is still an issue with latest build when Kubernetes is started... if I disable Kubernetes and restart docker I can access local network... if I make the modifications you suggested above it works as well but after Docker gets updated, you must fix this again manually.

cdenneen avatar Sep 04 '18 17:09 cdenneen

👍 for a fix to this issue. We also have a local network with IPs in the 10.1.x.x range.

refractalize avatar Sep 06 '18 07:09 refractalize

I can confirm the issue also, please add an setting to allow a different range.

mblaschke avatar Nov 09 '18 14:11 mblaschke

@netroby why is this closed? Is there another issue or corresponding PR that closes this? This is a huge issue.

cdenneen avatar Nov 17 '18 21:11 cdenneen

@cdenneen I gave up . I do not use docker for windows to deploy my kubernetes. I am now using kubeadm setup my kubernetes.

ghost avatar Nov 17 '18 23:11 ghost

This is a larger issue. Could you please reopen?

cdenneen avatar Nov 18 '18 03:11 cdenneen

@cdenneen reopen it as you request.

ghost avatar Nov 19 '18 07:11 ghost

Hi all, I just want to point out that I'm seeing this issue in Docker for Mac, so this issue is not at all specific to Docker for Windows.

refractalize avatar Nov 19 '18 09:11 refractalize

Hit this same issue today.

pselden avatar Nov 19 '18 16:11 pselden

@refractalize yes I have linked the issue back to one in docker-for-mac as well to hopefully gain traction for either side but so far no momentum from either direction. I just wanted to keep the issue open so it's visible from both projects as outstanding (thanks for that @netroby)

cdenneen avatar Nov 19 '18 17:11 cdenneen

hi @cdenneen yes i noticed that just after my post ;)

cheers

refractalize avatar Nov 19 '18 17:11 refractalize

@guillaumerose Is there any traction on this issue? Maybe a docker upstream issue number you can link to that we can subscribe to?

cdenneen avatar Apr 18 '19 21:04 cdenneen

/remove-lifecycle stale

cdenneen avatar Apr 18 '19 21:04 cdenneen

@guillaumerose To echo the above comment, this is still an issue, and as far as I can tell there isn't a reasonable and repeatable solution to fix it. Has there been any progress (internal or otherwise) to allow users to set the CNI bridge subnet to something other than 10.1.0.0/16? Thanks!

stevenpall avatar Apr 23 '19 20:04 stevenpall

@guillaumerose do you have tracking for this feature? I know you mentioned you were going to bring it up but now with 2.x release still curious where this stands on the backlog?

cdenneen avatar Jul 09 '19 20:07 cdenneen

I changed the address to 192.168.1.0 and gateway and dns to 192.168.1.1. However, kubernetes didn't started. So it doesn't worked for me. I changed back my configuration to original values to make kubernetes work.

gurkanindibay avatar Aug 22 '19 07:08 gurkanindibay

The network settings aren't the fix for Kubernetes.

Steps to fix this are described here:

https://github.com/docker/for-win/issues/1667#issuecomment-367357067

cdenneen avatar Aug 22 '19 18:08 cdenneen

The network settings aren't the fix for Kubernetes.

Steps to fix this are described here:

#1667 (comment)

That file is reverted to the default if you restart docker daemon, so it's not a solution.

I can't understand how can this issue still exists, it's a major problem on larger corporate networks.

zolij avatar Jan 22 '20 12:01 zolij

@zolij I was told this should be fixed in the "2.x beta" a year ago but still don't see it in the UI to account for this yet.

cdenneen avatar Jan 22 '20 18:01 cdenneen

Any updates?

cdenneen avatar Mar 19 '20 15:03 cdenneen

/remove-lifecycle frozen

cdenneen avatar Mar 19 '20 15:03 cdenneen

I just ran into this issue now too. The fact that it's 10.1.0.0/16 too means it covers a very wide set of addresses

chriswiggins avatar Mar 27 '20 00:03 chriswiggins

Issues go stale after 90 days of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Jun 25 '20 01:06 docker-robott

/remove-lifecycle stale

zolij avatar Jun 25 '20 06:06 zolij