1. Followed -> https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/
After I clone as they mentioned in doc. git clone --depth 1 https://github.com/kubernetes/kubernetes.git. I could not find the file cluster/ubuntu/config-default.sh to configure cluster.
Ok, I left it default and try to run KUBERNETES_PROVIDER=ubuntu ./kube-up.sh but there is no verify-kube-binaries.sh file
root@ultron:/home/veeru# KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
... Starting cluster using provider: ubuntu
... calling verify-prereqs
Skeleton Provider: verify-prereqs not implemented
... calling verify-kube-binaries
./kube-up.sh: line 44: verify-kube-binaries: command not foundOutdated Documentation?
2. From official git repo, I have downloaded 1.6.4 version (Branch->Tag->v1.6.4) After cluster/ubuntu/config-default.sh configuration I ran KUBERNETES_PROVIDER=ubuntu ./kube-up.sh in cluster directory. But some of the links are outdated!
3. Finally I tried in Ubuntu 16 with kubeadm.https://kubernetes.io/docs/getting-started-guides/kubeadm/
The kubeadm init command successfully completed without any problem, but when I try to kubectl cluster-info, it is showing The connection to the server localhost:8080 was refused
Any help?(Mainly I want to install K8 in Ubuntu 14)
UPDATE 1
Point 3(K8 on Ubuntu 16 with kubeadm) is resolved by running
sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.confI recommend to use kops which is under kubernetes project
I have had some fun with this :-)
So, Kubernetes 1.6.4 on Ubuntu 14.04 (Trusty):
nsenter built & installed (nsenter is a hard kubelet dependency and is not present in 14.04)kubelet and kubeadm packages to remove the systemd dependency (and repace it with an upstart script)kubelet manually during kubeadm init (because kubeadm only supports the systemd-style init system)I've created a proof of concept script to the above. It's available at: https://gist.github.com/lenartj/0b264cb70e6cb50dfdef37084f892554#file-trusty-kubernetes-sh
You can follow the official guide installing kubeadm and creating the cluster. Just skip the kubeadm and kubelet installation steps and use the script above instead.
There is a demo at: https://asciinema.org/a/124160
The steps are:
curl -sSL https://get.docker.com/ | shapt-get update && apt-get install -y apt-transport-httpscurl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key aecho 'deb http://apt.kubernetes.io/ kubernetes-xenial main' >/etc/apt/sources.list.d/kubernetes.listapt-get install -y kubectl kubernetes-cni binutils ebtables socatcurl -sSL https://gist.github.com/lenartj/0b264cb70e6cb50dfdef37084f892554#file-trusty-kubernetes-sh | bashcp -v /tmp/tmp.xxxxx/nsenter /usr/local/bindpkg -i /tmp/tmp.xxxxx/*-patchedkubeadm initservice kubelet startcp /etc/kubernetes/admin.conf $HOME/; chown $(id -u):$(id -g) $HOME/admin.conf; export KUBECONFIG=$HOME/admin.confkubectl apply -f https://git.io/weave-kube-1.6It's not a nice & clean solution but it works.
kubeadm is the way to go. kube-up.sh has been deprecated long back. https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
You may also want to try https://www.ubuntu.com/containers/kubernetes
Step 6 is working after modifying below steps in trusty-kubernetes.sh
\==============
make_nsenter()
{
cat <pwd:/tmp" ubuntu:14.04
apt-get update
apt-get install -y git bison
apt-get build-dep -y util-linux
apt-get install -y autopoint
apt-get install -y autoconf
apt-get install -y libtool
apt-get install -y gettext
apt-get install -y pkg-config
apt-get install -y make
cd /tmp
git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
cd util-linux
./autogen.sh
./configure --without-python --disable-all-programs --enable-nsenter
make nsenter
EOF
cp -v util-linux/nsenter .
rm -rf util-linux
}
\=================