I am testing and learning kubernetes. I am using ubuntu 16.04 and have been looking for the simple and straightforward installation guide, but have failed to find one... Any suggestion? My aim is to be able to run kubernetes as master on one ubuntu 16.04 laptop and later set up a second ubuntu 16.04 laptop easily join the cluster. I wonder if this can be achieved with the current version of kubernetes and the 16.04 version of ubuntu... Any pointer to a guide or useful resource will be appreciated... Best regards.
There is a guide in the Kubernetes docs especially for Ubuntu: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/getting-started-guides/ubuntu.md
Not sure if this matches your needs, but Minikube is IMO the fastes way to run a Kubernetes cluster locally: https://github.com/kubernetes/minikube
Besides that: setting up a multi-node cluster isn't a simple task, because you have to set up the overlay network and Kubernetes consist of many components.
I came across an article to install Kubernetes in Ubuntu 16.04. https://www.techrepublic.com/article/how-to-quickly-install-kubernetes-on-ubuntu/
I would suggest you to go with latest Kubernetes version installation as new version is supported with some extensions like deployments, replica sets(similar to replication controller).
You could check the way to bring up a single-node cluster which is via cluster/get-kube-local.sh. It shows you how one could use hyperkube to bring up a cluster.
If you want to get into the underlying details, the other method is to check out the contents of hack/local-up-cluster.sh. This brings up each component separately, such as:
One could potentially use the same steps to create a two-node cluster as you stated in your question.
Please try https://github.com/nitinmidha/kube-cluster It is tested with kube v1.4.6 and Ubuntu 16.04
These are bash scripts written to provide "Kubernetes HA(multi master with etcd clustering, multi minion) Secure(Client Certification on etcd and kube-api-server) Cluster on Ubuntu 16.04"
Limitations
https://master_ip/ui will not work as master can not reach to containers. Dashboard is hosted as a separate internal service available on minion nodes on port 9090 using dashboard service ip address. If required it can be proxied through any reverse proxy server like NGINX. Or Service can expose NodePort and can be available outside the cluster
kube-apiserver exposes port 8080 for 127.0.0.1 interface on master. Once https://github.com/kubernetes/kubernetes/issues/13598 is fixed and avialble, --insecure-port will be set to 0.
Flannel does not secure data packets. There is a PR (https://github.com/coreos/flannel/pull/290) to add ipsec backend that would encrypt data packets. Once this feature is avialble, setup will be configured to secure it.
kubelet and kube-proxy does not support multiple kube-apiserver address. So we still have a single point of failure, as only one ip address can be configured. To workaround, we can expose all the master nodes under an external load balancer and then point to that address. Issue is logged and worked upon in kubernetes. https://github.com/kubernetes/kubernetes/issues/19152
Features