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.
- .deb/.rpm files to install ansible
- .deb/.rpm files to install docker
- .deb/.rpm files to install kubeadm, kubectl, kubelet
- Docker images of kubernetes cluster (You can find that with
kubeadm config images list
)
- Docker images of kubernetes addons (flannel/calico, dashboard, etc)
- Your ansible playbooks
The installation steps are as follow:
- Install ansible with dpkg or rpm (manully)
- Install docker with dpkg or rpm (via ansible tasks)
- Install kubeadm, kubectl, kubelet with dpkg or rpm (via ansible tasks)
docker load
all the docker images (via ansible tasks)
- Run
kubeadm init
and kubeadm join
(via ansible tasks)
There may be lots of details here. Feel free to leave your comments.