From 828aa5453eb7301367d252ff839b38e01e3047a1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 15 Jan 2019 11:04:52 +0100 Subject: Add kubernetes module for local infrastructure work --- modules/development/kubernetes.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/development/kubernetes.nix (limited to 'modules/development') diff --git a/modules/development/kubernetes.nix b/modules/development/kubernetes.nix new file mode 100644 index 0000000..692e46d --- /dev/null +++ b/modules/development/kubernetes.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + networking.bridges = { + cbr0.interfaces = []; + }; + networking.interfaces = { + cbr0 = { + ipv4.addresses = [ + { address = "10.10.0.1"; + prefixLength = 24; + } + ]; + }; + }; + services.kubernetes.roles = ["master" "node"]; + services.kubernetes.kubelet.extraOpts = "--fail-swap-on=false"; + virtualisation.docker.extraOptions = '' + --iptables=false --ip-masq=false -b cbr0 + ''; +} -- cgit 1.4.1