Run Kubernetes on a single-node

7 views
Skip to first unread message

Kyle Mathews

unread,
Jun 7, 2015, 2:02:39 AM6/7/15
to google-c...@googlegroups.com
Beyond this (somewhat outdated) guide, is there any instructions on setting up Kubernetes on a single node? I have a small service I'm building that I want to use Kubernetes for but don't want the expense of paying for 2-3 VMs.

Tim Hockin

unread,
Jun 16, 2015, 1:42:54 AM6/16/15
to google-c...@googlegroups.com
I don't think there are any current examples of this, I'm sorry to
say. it's not an unreasonable request, it's just not the common case
so far. Docs welcome!
> --
> You received this message because you are subscribed to the Google Groups
> "Containers at Google" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-contain...@googlegroups.com.
> To post to this group, send email to google-c...@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-containers.
> For more options, visit https://groups.google.com/d/optout.

Robert Bailey

unread,
Jun 16, 2015, 1:49:40 AM6/16/15
to google-c...@googlegroups.com
The Running kubernetes locally via Docker getting started guide explains how to run the whole cluster on a single node. It's intended for development, but you could certainly run it on a single node on a cloud provider instead (although I wouldn't recommend it to run anything in production). 

Michael Würtinger

unread,
Jun 16, 2015, 11:39:42 AM6/16/15
to google-c...@googlegroups.com
We're running Kubernetes locally for development purposes using the Docker approach.
Do make things even easier we are maintaining a script in this Github repository: https://github.com/egymgmbh/kubernetes-up

Paris, Eric

unread,
Jun 16, 2015, 11:52:19 AM6/16/15
to google-c...@googlegroups.com
Depends if you want just the operational demons or them + all of the
'addons' set up by the in tree salt stack. If you just want
operational deamons on a RHEL/CentOS/Fedora system all you have to do
is

yum install -y etcd docker kubernetes
for d in etcd kube-apiserver kube-controller-manager kube-scheduler
kube-proxy kubelet; do
systemctl enable $d
sysemctl start $d
done

tada, single node.

Ming Fang

unread,
Jun 16, 2015, 12:21:26 PM6/16/15
to google-c...@googlegroups.com
I Dockerized the kmaster and knodes that can run on single or multiple machines.

Steps to use
1-first use the ./build script to build both images
2-use the ./run script to start the kmaster
3-use the ./run <kmaster host> script to start the knode
4-repeat #3 on other machines if needed

I've added a few notable features
1-The kmaster has a http gateway to execute kubectl commands,e.g. http://localhost:3000/kubectl/get%20services
2-Each knode also runs dnsmasq for service lookup(instead of skydns)
3-knode networking is using OpenVSwitch. Note the kmaster is not on the OVS network on purpose.
Reply all
Reply to author
Forward
0 new messages