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

docker driver : static ip, make container IPs survive restart. #7756

Closed
medyagh opened this issue Apr 17, 2020 · 1 comment · Fixed by #8764
Closed

docker driver : static ip, make container IPs survive restart. #7756

medyagh opened this issue Apr 17, 2020 · 1 comment · Fixed by #8764
Assignees
Labels
area/networking networking issues co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@medyagh
Copy link
Member

medyagh commented Apr 17, 2020

Feature request: assign static IP for minikube docker/podman containers

currently if we stop minikube, we might actually, have a different IP that will cause a kubeadm Reset (expensive)

I0417 15:04:19.699937   20147 kubeadm.go:434] needs reset: configs differ:
	-- stdout --
	--- /var/tmp/minikube/kubeadm.yaml	2020-04-17 22:01:08.390045502 +0000
	+++ /var/tmp/minikube/kubeadm.yaml.new	0001-01-01 00:00:00.000000000 +0000
	@@ -1,7 +1,7 @@
	 apiVersion: kubeadm.k8s.io/v1beta1
	 kind: InitConfiguration
	 localAPIEndpoint:
	-  advertiseAddress: 172.17.0.4
	+  advertiseAddress: 172.17.0.2
	   bindPort: 8443
	 bootstrapTokens:
	   - groups:
	@@ -14,25 +14,25 @@
	   criSocket: /var/run/crio/crio.sock
	   name: "crio-20200417T145706-10869"
	   kubeletExtraArgs:
	-    node-ip: 172.17.0.4
	+    node-ip: 172.17.0.2
	   taints: []
	 ---
	 apiVersion: kubeadm.k8s.io/v1beta1
	 kind: ClusterConfiguration
	 apiServer:
	-  certSANs: ["127.0.0.1", "localhost", "172.17.0.4"]
	+  certSANs: ["127.0.0.1", "localhost", "172.17.0.2"]

as seen here:
https://storage.googleapis.com/minikube-builds/logs/7752/775a91c/Docker_Linux.html#fail_TestPause%2fserial%2fSecondStartNoReset

@medyagh medyagh added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. co/docker-driver Issues related to kubernetes in container area/networking networking issues kind/feature Categorizes issue or PR as related to a new feature. labels Apr 17, 2020
@josedonizetti
Copy link
Member

@medyagh If we create our own custom network, we can set a fixed ip when running the container --ip. The problem of creating our own network is possible conflicts of subnets with existing networks, so we would have to try a few subnets options until a non used one is found.

Although we currently don't worry about this on the kvm2 driver, there is a fixed subnet that could conflict, and if it does we are not trying other options: https://github.com/kubernetes/minikube/blob/master/pkg/drivers/kvm/network.go#L41

@medyagh medyagh added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jun 23, 2020
@medyagh medyagh changed the title docker driver : make container IPs survive restart. docker driver : static ip, make container IPs survive restart. Jun 23, 2020
@priyawadhwa priyawadhwa added this to the v1.13.0-candidate milestone Jul 6, 2020
@priyawadhwa priyawadhwa added ux/embedded Embedded UX blockers july-chill labels Jul 17, 2020
@tstromberg tstromberg removed july-chill ux/embedded Embedded UX blockers labels Jul 17, 2020
@priyawadhwa priyawadhwa self-assigned this Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking networking issues co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants