You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.
We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.
The Setup
The VMs will be net-installed debian 8.5.0 AMD64 They will be running inside virtualbox, and have the addresses:
kube-master.apokalyptik.lan 10.0.1.80
kube-node1.apokalyptik.lan 10.0.1.81
kube-node2.apokalyptik.lan 10.0.1.82
Virtualbox because I don't have a whole bunch of actual machines sitting around to do this on these days, and this emulates setting it up from scratch, by hand, on 3 machines anyhow.
The flannel network will be 192.168.1.0/16 (because the numbers are very different which makes it easy to see that it is, or isnt, working)
I am just figuring out how to get all of this up and running. There are security issues, and best practices that are not taken into account here. Some of these I know and skipped to make this document a good introduction for just how to get things working (example: you should have two etcd clusters running. one for flanneld and one for kubernetes and while all nodes and masters need to be able to read/write the flanneld etcd cluster only masters should be able to access the kubernetes etcd cluster at all). And probably a great many I don't, or don't yet know exactly how to address (example kubelet can probably run as the kube user instead of root with some permissions work? maybe?)
The point is that this document is a starting point for getting kubernetes up and running. It's a highly distilled crash course in just what has to be there for it to literally work at all. Kubernetes and the surrounding software ecosystem is big. REALLY BIG. and it's going to take a lot of time and work to understand it
Last note
I am not 100% sure of this. but if you wanted, for some reason, a single machine kubernetes setup I think you can probably simply replace the kubelet service file on the master with the one from the nodes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yes... we want a single 132M binary
from inside a 352M tarball
from inside another 1.4G tarball.
Such is life.
I expect you'll just get this file once and copy it around...
curl \
--progress-bar \
--location \
'https://github.com/kubernetes/kubernetes/releases/download/v1.3.4/kubernetes.tar.gz' \
| tar --to-stdout -zxf - kubernetes/server/kubernetes-server-linux-amd64.tar.gz \
| tar --to-stdout -zxf - kubernetes/server/bin/hyperkube > /usr/bin/hyperkube
chmod a+x /usr/bin/hyperkube
cd /usr/bin/
/usr/bin/hyperkube --make-symlinks
Yes... we want a single 132M binary
from inside a 352M tarball
from inside another 1.4G tarball.
Such is life.
I expect you'll just get this file once and copy it around...
curl \
--progress-bar \
--location \
'https://github.com/kubernetes/kubernetes/releases/download/v1.3.4/kubernetes.tar.gz' \
| tar --to-stdout -zxf - kubernetes/server/kubernetes-server-linux-amd64.tar.gz \
| tar --to-stdout -zxf - kubernetes/server/bin/hyperkube > /usr/bin/hyperkube
chmod a+x /usr/bin/hyperkube
cd /usr/bin/
/usr/bin/hyperkube --make-symlinks
as of October 2017, latest K8s version is 1.8.1. Does it yet make sense to dive into this tutorial?
See also for example: https://blog.alexellis.io/kubernetes-in-10-minutes/