I need to install a Kubernetes cluster in complete offline mode. I can follow all the instructions at http://kubernetes.io/docs/getting-started-guides/scratch/ and install from binaries but that seems like an involved setup. The installation using kubeadm
is pretty easy but I don't see any docs on whether I can install the cluster by downloading the .deb
packages locally.
Any pointers to that direction are much appreciated.
Can we install Kubernetes in a complete offline mode with kubeadm?
Yes, I've already set up several offline clusters (1.15.x) with ansible and kubeadm. Mainly you need to prepare the following things in a USB drive and bring it to your offline environment.
kubeadm config images list
)The installation steps are as follow:
docker load
all the docker images (via ansible tasks)kubeadm init
and kubeadm join
(via ansible tasks)There may be lots of details here. Feel free to leave your comments.
I don't think that anyone has documented this yet. The biggest thing needed is to get the right images pre-loaded on every machine in the cluster. After that things should just work.
There was some discussion of this in this PR: https://github.com/kubernetes/kubernetes/pull/36759.
If I had the bandwidth I'd implement a kubeadm list-images
so we could do docker save $(kubeadm list-images) | gzip > kube-images.tar.gz
. You could manually construct that list by reading code and such.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With