3 ms·
Use nixos to run your k8 cluster if you are insane (or have the $$$ for salaries) enough to run your own k8. See https://github.com/NixOS/nixpkgs/blob/master/n
by ghuntley 7y ago
Use nixos to run your k8 cluster if you are insane (or have the $$$ for salaries) enough to run your own k8.
See https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/cluster/kubernetes/default.nix https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/s...
Specifically "services.kubernetes.apiserver.enable = true"
My strong recommendation is to use nix to generate super optimised and amazing docker images then use them with k8 on a PaaS.
https://grahamc.com/blog/nixos-on-zfs https://grahamc.com/blog/nixos-on-zfs
If using k8 (self host or PaaS), keep an eye on https://github.com/xtruder/kubenix https://github.com/xtruder/kubenix as it'll blow your mind. Noyaml, infrastructure testing framework, deployment etc using nix.
- solatic 7y agoI'm familiar with that flag, I tried to use it to set up a local development environment on my NixOS laptop. It forces you to use easyCerts and Flannel, neither of which you should use in production on AWS as a default. Disabling them to have more control over rotating certificates and to use AWS VPC CNI networking takes you well far away from a managed experience. Additionally, the channel ecosystem as it exists today does not allow you to choose your minor version of Kubernetes, which is another issue if you want to keep your underlying system up to date but also want to make sure that you're controlling when you adopt a new minor version so that you can deal with deprecations as necessary.
- ghuntley 7y agoAh yeah, that was a toy example to highlight how services are defined/enabled as k8 is notoriously known to be f'ing hard, involved, complex and intense to setup. "Services.<service>.enable" is very similar to freebsd and /usr/local/etc except with standardised language to configure every daemon. As for channel ecosystem and having control. Pin and override using layers — https://github.com/digital-asset/daml/blob/master/nix/nixpkgs.nix#L11 https://github.com/digital-asset/daml/blob/master/nix/nixpkg... Then use https://cachix.org/ https://cachix.org/ for stupid fast builds via caching.