Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Kubernetes on NixOS

On NixOS is is easy to set up Kubernetes by a single line of config:

services.kubernetes.roles = ["master" "node"];

This installs both the master and node components on the local system and therefore creates a nice little working local kubernetes "cluster".

If I want to set up a "real" cluster I need to install it over multiple hosts, but I'm not sure about the intended way to connect them.

If I install only the master components on one host and only the node components on another node, how do I tell the node where to find its master?

There are quite a few configuration options, but I'm not sure how to use them correctly. Is anyone aware of some example setup?

like image 411
michas Avatar asked Apr 22 '18 07:04

michas


2 Answers

I'm currently working to automate Kubernetes deployment with NixOS / NixOps. It works quiet well with multiple local VirtualBox nodes. Regarding AWS integration I still have to fix few things. Then I will try to integrate with other cloud providers.

You can have a look to this repository: NixOps Kubernetes. Do not hesitate to fork and help me improve it.

like image 175
Thomas Pham Avatar answered Nov 15 '22 13:11

Thomas Pham


Have a look at the latter part of Jaka Hudoklin/offlinehacker's NixCon '15 presentation about Kubernetes on NixOS at GateHub. It has an example configuration that configures docker to use a bridge interface. You can then use openvswitch to link the networks together.

like image 25
Robert Hensing Avatar answered Nov 15 '22 13:11

Robert Hensing