Kubernetes: Difference between revisions
imported>Peterbecich →Tooling: nixos-ha-kubernetes |
Add more nix-based kubernetes tools |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[https://kubernetes.io/ Kubernetes] is an open-source container orchestration system for automating software deployment, scaling, and management. | |||
This wiki article extends the documentation in [https://nixos.org/manual/nixos/stable/#sec-kubernetes NixOS manual]. | |||
== [[wikipedia:en:KISS principle|KISS]] == | == [[wikipedia:en:KISS principle|KISS]] == | ||
Line 23: | Line 27: | ||
Add to your <code>configuration.nix</code>: | Add to your <code>configuration.nix</code>: | ||
<syntaxhighlight lang=nix> | <syntaxhighlight lang="nix"> | ||
{ config, pkgs, ... }: | { config, pkgs, ... }: | ||
let | let | ||
# When using easyCerts=true the IP | # When using 'easyCerts = true;', the IP address must resolve to the master at the time of creation. | ||
# In this case, set 'kubeMasterIP = "127.0.0.1";'. Otherwise, you may encounter the following issue: https://github.com/NixOS/nixpkgs/issues/59364. | |||
kubeMasterIP = "10.1.1.2"; | kubeMasterIP = "10.1.1.2"; | ||
kubeMasterHostname = "api.kube"; | kubeMasterHostname = "api.kube"; | ||
Line 248: | Line 252: | ||
* reboot all your nodes | * reboot all your nodes | ||
* continue with [https://rook.io/docs/rook/v1.2/ceph-quickstart.html the official quickstart guide] | * continue with [https://rook.io/docs/rook/v1.2/ceph-quickstart.html the official quickstart guide] | ||
* in <code>operator.yaml</code>, | * in <code>operator.yaml</code>, help the CSI plugins find the hosts' ceph kernel modules by adding (or uncommenting -- they're in the example config) these entries: | ||
CSI_CEPHFS_PLUGIN_VOLUME: | | |||
- name: lib-modules | |||
hostPath: | |||
path: /run/current-system/kernel-modules/lib/modules/ | |||
CSI_RBD_PLUGIN_VOLUME: | | |||
- name: lib-modules | |||
hostPath: | |||
path: /run/current-system/kernel-modules/lib/modules/ | |||
=== NVIDIA === | === NVIDIA === | ||
Line 324: | Line 336: | ||
There are various community projects aimed at facilitating working with Kubernetes combined with Nix: | There are various community projects aimed at facilitating working with Kubernetes combined with Nix: | ||
* [https://github.com/saschagrunert/kubernix kubernix]: simple setup of development clusters using Nix | * [https://github.com/saschagrunert/kubernix kubernix]: simple setup of development clusters using Nix | ||
* [https://kubenix.org/ kubenix] - [https://github.com/hall/kubenix GitHub (updated 2023)] | * [https://kubenix.org/ kubenix] - [https://github.com/hall/kubenix GitHub (updated 2023)] | ||
* [https://github.com/justinas/nixos-ha-kubernetes nixos-ha-kubernetes] | * [https://github.com/justinas/nixos-ha-kubernetes nixos-ha-kubernetes] | ||
* [https://github.com/nix-community/nixhelm nixhelm] - generates nix expressions from a selection of helm charts | |||
* [https://github.com/reMarkable/helmfile-nix helmfile-nix] - wrapper around [[Helm and Helmfile|Helmfile]] to allow writing helmfiles in the nix language | |||
== References == | == References == | ||
Line 338: | Line 351: | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category: | [[Category:Server]] | ||
[[Category: | [[Category:Container]] | ||
[[Category:NixOS Manual]] |