Minikube: Support run minikube offline

Created on 24 Jul 2016  路  6Comments  路  Source: kubernetes/minikube

Is it possible to run minikube offline? I want to download everything required (minikube and kubectl binaries. Also create local registry to store the required images) in advance. Then run minikube in an environment without internet access.

Currently it seems not possible because the minikube starting process need to pull images from gcr.io. Is there anyway to configure minikube to use images from my local registry when staring up for the first time?

kinfeature

Most helpful comment

Yes, set the dashboard pod's "ImagePullPolicy" to "IfNotPresent" makes user can use an existing minikube without internet connection. This solves one problem. Can you please let me know when this change is done? So I can download the latest minikube to use.

Another requirement is make it possible to start minikube for the first time without internet connection. The background is connection to google is quite hard in China. There are two scenarios for this requirement.

  1. For demo or tutorial purpose, we want to show how easy it is to use minikube to create a K8S cluster environment. We need every student to do this in a local network environment without internet connection.
  2. In a software company working in a local network environment, we want every developer can easily use minikube for their development work. We can download required binaries and docker images to a central server. Then developers can connect to this server to get required binaries and docker images to create their minikube environment.

All 6 comments

Hey,

It looks like we have "ImagePullPolicy" set to always for our dashboard pod, so startup will always try to pull that.

We should be able to change that to "IfNotPresent", which would mean you'd be able to:

# With internet connection
$ minikube start
# Wait for all system pods to be running (they should have STATUS Running)
$ kubectl get pods --namespace=kube-system
NAME                            READY     STATUS    RESTARTS   AGE
kube-addon-manager-minikubevm   1/1       Running   9          6d
kubernetes-dashboard-90ymu      1/1       Running   9          6d
# Now you can stop minikube
$ minikube stop
# Now you can drop your internet connection
$ minikube start

Would that be sufficient?

Yes, set the dashboard pod's "ImagePullPolicy" to "IfNotPresent" makes user can use an existing minikube without internet connection. This solves one problem. Can you please let me know when this change is done? So I can download the latest minikube to use.

Another requirement is make it possible to start minikube for the first time without internet connection. The background is connection to google is quite hard in China. There are two scenarios for this requirement.

  1. For demo or tutorial purpose, we want to show how easy it is to use minikube to create a K8S cluster environment. We need every student to do this in a local network environment without internet connection.
  2. In a software company working in a local network environment, we want every developer can easily use minikube for their development work. We can download required binaries and docker images to a central server. Then developers can connect to this server to get required binaries and docker images to create their minikube environment.

Similar to #374 - thanks for some better use cases!

@r2d4, setting the PullPolicy could be another good starter bug.

I think we have as much running offline as we can now. Please re-open if you have any other issues.

When running minikube start it downloads an iso file, how's that considered offline support?
Also it is not possible to direct download this iso from anywhere, I have to run minikube start in a minikube instance with internet connection, and take the iso file from some cache directory.
Theoretically, is it enough for running offline or there are more surprises?

Was this page helpful?
0 / 5 - 0 ratings