all repos — nixfiles @ 828aa5453eb7301367d252ff839b38e01e3047a1

System and user configuration, managed by nix and home-manager

Add kubernetes module for local infrastructure work
Alan Pearce alan@alanpearce.eu
Tue, 15 Jan 2019 11:04:52 +0100
commit

828aa5453eb7301367d252ff839b38e01e3047a1

parent

89667596a464800efcbcc7fca223f32a206102d5

2 files changed, 22 insertions(+), 0 deletions(-)

jump to
A 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
+  '';
+}
M satoshipad.nixsatoshipad.nix
@@ -13,6 +13,7 @@ ./modules/configuration/user.nix     ./modules/development/base.nix
     ./modules/development/javascript.nix
     ./modules/development/lisp.nix
+    ./modules/development/kubernetes.nix
     ./modules/hardware/adb.nix
     ./modules/hardware/audio.nix
     ./modules/hardware/systemd-boot.nix