summary refs log tree commit diff stats
path: root/modules/development
diff options
context:
space:
mode:
authorAlan Pearce2019-01-15 11:04:52 +0100
committerAlan Pearce2019-01-15 11:04:52 +0100
commit828aa5453eb7301367d252ff839b38e01e3047a1 (patch)
tree6558e599f68f10717441e57c3a435ad3e2d35e12 /modules/development
parent89667596a464800efcbcc7fca223f32a206102d5 (diff)
downloadnixfiles-828aa5453eb7301367d252ff839b38e01e3047a1.tar.lz
nixfiles-828aa5453eb7301367d252ff839b38e01e3047a1.tar.zst
nixfiles-828aa5453eb7301367d252ff839b38e01e3047a1.zip
Add kubernetes module for local infrastructure work
Diffstat (limited to 'modules/development')
-rw-r--r--modules/development/kubernetes.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/development/kubernetes.nix b/modules/development/kubernetes.nix
new file mode 100644
index 00000000..692e46d6
--- /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
+  '';
+}