generation 500 25.11.20250714.62e0f05
This commit is contained in:
38
extras/kube-master.nix
Normal file
38
extras/kube-master.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
# When using easyCerts=true the IP Address must resolve to the master on creation.
|
||||||
|
# So use simply 127.0.0.1 in that case. Otherwise you will have errors like this https://github.com/NixOS/nixpkgs/issues/59364
|
||||||
|
kubeMasterIP = "172.24.233.22";
|
||||||
|
kubeMasterHostname = "api.kube";
|
||||||
|
kubeMasterAPIServerPort = 6443;
|
||||||
|
in {
|
||||||
|
# resolve master hostname
|
||||||
|
networking.extraHosts = "${kubeMasterIP} ${kubeMasterHostname}";
|
||||||
|
|
||||||
|
# packages for administration tasks
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kompose
|
||||||
|
kubectl
|
||||||
|
kubernetes
|
||||||
|
];
|
||||||
|
|
||||||
|
services.kubernetes = {
|
||||||
|
roles = ["master" "node"];
|
||||||
|
masterAddress = kubeMasterHostname;
|
||||||
|
apiserverAddress = "https://${kubeMasterHostname}:${toString kubeMasterAPIServerPort}";
|
||||||
|
easyCerts = true;
|
||||||
|
apiserver = {
|
||||||
|
securePort = kubeMasterAPIServerPort;
|
||||||
|
advertiseAddress = kubeMasterIP;
|
||||||
|
};
|
||||||
|
|
||||||
|
# use coredns
|
||||||
|
addons.dns.enable = true;
|
||||||
|
|
||||||
|
# needed if you use swap
|
||||||
|
kubelet.extraOpts = "--fail-swap-on=false";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -83,7 +83,7 @@ in {
|
|||||||
toolbar = true;
|
toolbar = true;
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
{
|
{
|
||||||
name = "Nixos";
|
name = "nixos";
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
{
|
{
|
||||||
name = "noogle";
|
name = "noogle";
|
||||||
@@ -108,7 +108,7 @@ in {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "CMU";
|
name = "cmu";
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
{
|
{
|
||||||
name = "computing facilities";
|
name = "computing facilities";
|
||||||
@@ -170,7 +170,7 @@ in {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "Cal";
|
name = "cal";
|
||||||
url = "https://calendar.google.com/";
|
url = "https://calendar.google.com/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../system/system.nix
|
../../system/system.nix
|
||||||
../meta.nix
|
../meta.nix
|
||||||
./ssh.nix
|
../../extras/ssh.nix
|
||||||
./gpu.nix
|
../../extras/gpu.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../system/system.nix
|
../../system/system.nix
|
||||||
../meta.nix
|
../meta.nix
|
||||||
./ssh.nix
|
../../extras/ssh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user