mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-16 09:32:39 +02:00
feat(hosts,lib): use kube-vip for k3s's HA
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
...
|
||||
}: let
|
||||
hostName = "k3s-prod-1-master-2"; # define your hostname.
|
||||
k3sServerName = "k3s-prod-1-master-1";
|
||||
|
||||
coreModule = mylib.genKubeVirtCoreModule {
|
||||
inherit pkgs hostName;
|
||||
@@ -16,7 +15,9 @@
|
||||
inherit pkgs;
|
||||
kubeconfigFile = "/home/${myvars.username}/.kube/config";
|
||||
tokenFile = config.age.secrets."k3s-prod-1-token".path;
|
||||
serverIp = myvars.networking.hostsAddr.${k3sServerName}.ipv4;
|
||||
# use my own domain & kube-vip's virtual IP for the API server
|
||||
# so that the API server can always be accessed even if some nodes are down
|
||||
masterHost = "prod-cluster-1.writefor.fun";
|
||||
};
|
||||
in {
|
||||
imports =
|
||||
|
||||
Reference in New Issue
Block a user