1.2 KiB
1.2 KiB
modules/nixos/server/k8s/
Full upstream Kubernetes role (as opposed to the lighter k3s/). Splits responsibilities
into master and node modules under a shared option set.
Files
k8s/
├── default.nix # skyg.nixos.server.k8s.* — shared options, firewall, services.kubernetes base
├── master.nix # Control-plane (apiserver/scheduler/controller/etcd) config
└── node.nix # Worker node config
Behaviour
default.nixadds the master hostname to/etc/hosts(masterIP/masterHostName), opens the control-plane ports (apiserver6443, kubelet 10250/10257/10259, etcd 2379–2380), installskubectl/kubernetes, and setseasyCerts+ DNS addon.- A host declares its role via
isMaster/isNode.
Option Namespace
skyg.nixos.server.k8s.enable
skyg.nixos.server.k8s.isMaster
skyg.nixos.server.k8s.isNode
skyg.nixos.server.k8s.masterIP
skyg.nixos.server.k8s.masterHostName
skyg.nixos.server.k8s.masterAPIPort # default 6443
Conventions
- Use either this full
k8srole ork3son a host, not both. masterIP/masterHostNamemust be set on every member so the cluster can resolve the control plane.