Can we install Kubernetes in a complete offline mode with kubeadm? - kubernetes

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.

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.

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.

Related

Installing K8s using kOps on local machine

Has anyone ben able to install Kubernetes using kOps on bare metal/ local virtual machine running Ubuntu.
From one of Kops maintainer
As kOps maintainer, I can at least say that there is no active project to support bare-metal anymore. And the code we once had going in that direction was obsolete and removed.
Source: https://github.com/kubernetes/enhancements/issues/360
If you are looking for installing kubernetes clusters in local bare-metal machine, check out Kind. It is looking very promising.

Installing Database Driver in Superset running on Kubernetes

How can I install Database Driver in Superset Running on Top of Kubernetes.
based on the documentation, the recommended way is to add the pip installation inside docker requirement, but on the scenario of Kubernetes, I really don't wanna helm delete everything and then reinstall drivers.
Can I simply k8s exec inside Pods (superset & worker ) and pip install manually or I need to make changes inside requirement and do complete helm reinstall?

Does Kube-proxy come with standard k8s installation on ubuntu or is it separate package?

I am trying to install kubernetes on ubuntu 16.04.
I am able to install other kubernetes components but i dont know if kube-proxy is installed? Should i get separate binary package for it or does it come prepackaged with kubernetes apt-get installation?
In most cases installing kube-proxy onthe node it self is not required as a common pattern is running kube-proxy as a DaemonSet in your kube cluster.
In regular apt-get packages you would normally find kubectl, kubeadm and kubelet. If you use kubeadm to create the cluster it will automatically prepare kube-proxy as well (in the form of a container, as the rest of the elements of the kubernetes control panel). Therefore, you wouldn't need to install it separately.
If you use the official kubernetes tarball and try to manually install the cluster by yourself, you will need to configure kube-proxy just like the rest of the elements, but the binaries will be included in the tarball. This documentation shows the essential options to configure it: https://kubernetes.io/docs/getting-started-guides/scratch/#kube-proxy. Another resource is Kubernetes the hard way: https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/09-bootstrapping-kubernetes-workers.md

Enabling component manager in gcloud CLI

I made a fresh install of gcloud for ubuntu as instructed here. I want to use the additional components offered by gcloud like kubectl and docker.
So, when I tried typing gcloud components install kubectl, I get an error saying that The component manager is disabled for this installation. Here is the full error message:
This is because you installed google-cloud-sdk with a package manager like apt-get or yum.
kubectl:
If you look here you can see how to install additional components. Basically sudo apt-get install kubectl.
If by docker you mean the docker-credential-gcr then I don't know if there's a way to install using a package manager, can't seem to find it. Perhaps ou can try the github repo. Mind you, you don't need this for commands like gcloud docker -- push gcr.io/your-project/your-image:version.
If you mean actual docker for building images and running them locally, that's standalone software which you need to install separately, instructions here.
Alternatively, you can uninstall google-cloud-sdk with apt-get and then reinstall with interactive installer, which will support the suggested gcloud components install *

How to install Kubernetes from release binary on Centos 7

I've downloaded kubernetes binary release 1.4.1 and want to install it on my Centos 7 cluster. The official guide is based on "yum install ...".
Is there any guide/instruction show me how to install and configure k8s using a binary release?
Highly appreciate your help.
I was struggling with the same setup too. After hours of googling I decided to go the kubeadm way.
wget https://github.com/kubernetes/release/archive/master.zip
unzip master.zip
cd release-master/rpm && ./docker-build.sh
This produced three rpm packages of v1.4.3. After installing packages, simply run kubeadm init and that is all.
In addition, there is some nice documentation for CoreOS , I tried to follow this first, but then I got compatibility issues in configuration between CentOS and CoreOS. Hope this helps.