kubernetes on ubuntu 16.04

7/22/2016

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.

-- user3669547
docker
kubernetes
systemd
ubuntu-16.04

5 Answers

7/23/2016
-- svenwltr
Source: StackOverflow

7/22/2016

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.

-- svenwltr
Source: StackOverflow

11/7/2017

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).

-- Rishi Anand
Source: StackOverflow

7/23/2016

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:

  • kube-apiserver
  • kube-proxy
  • kube-dns
  • kube-controller-manager

One could potentially use the same steps to create a two-node cluster as you stated in your question.

-- Anirudh Ramanathan
Source: StackOverflow

12/6/2016

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

  1. 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

  2. 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.

  3. 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.

  4. 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

  1. Multi Master Cluster with ETCD clustering.
  2. TLS communication and client cert authentication between ETCD client and peer communication.
  3. TLS communication and client cert authentication between all kube-components
  4. Flannel is used for networking. Flannel does not support TLS yet.
  5. Node can be Master Only, Worker Only and Master-Worker mode. Master Only nodes do not have flannel/kubelet and kube-proxy, so will not be able to reach to pods. Also command 'kubelet get nodes' will not show this node.
  6. Option to connect to existing ETCD Cluster with TLS.
-- Nitin Midha
Source: StackOverflow