mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat(testing): use host-local networking, instead of flannel for local cluster
This commit is contained in:
parent
b299ee18b7
commit
0abf88e0d5
1 changed files with 23 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ let
|
|||
allowedTCPPorts = [
|
||||
10250 # kubelet
|
||||
];
|
||||
trustedInterfaces = ["docker0"];
|
||||
trustedInterfaces = ["docker0" "cni0"];
|
||||
|
||||
extraCommands = concatMapStrings (node: ''
|
||||
iptables -A INPUT -s ${node.config.networking.primaryIPAddress} -j ACCEPT
|
||||
|
|
@ -88,6 +88,28 @@ let
|
|||
ip = "192.168.1.1";
|
||||
};
|
||||
};
|
||||
extraConfiguration = {...}: {
|
||||
services.kubernetes.flannel.enable = false;
|
||||
services.kubernetes.kubelet = {
|
||||
networkPlugin = "cni";
|
||||
cni.config = [{
|
||||
name = "mynet";
|
||||
type = "bridge";
|
||||
bridge = "cni0";
|
||||
addIf = true;
|
||||
ipMasq = true;
|
||||
isGateway = true;
|
||||
ipam = {
|
||||
type = "host-local";
|
||||
subnet = "10.1.0.0/16";
|
||||
gateway = "10.1.0.1";
|
||||
routes = [{
|
||||
dst = "0.0.0.0/0";
|
||||
}];
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
} // attrs // {
|
||||
name = "kubernetes-${attrs.name}-singlenode";
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue