A Kubernetes-native operator for declarative management of bare-metal and virtual machines running NixOS, with built-in Kubernetes cluster provisioning capabilities.
It's based on NIO - NixOS Infrastructure Operator, that operates single NixOS Machine in GitOps approach
NICO (NixOS Infrastructure Cluster Orchestrator) provides a GitOps approach to managing infrastructure using NixOS. It extends beyond simple machine management to include complete Kubernetes cluster provisioning and lifecycle management.
- GitOps Infrastructure: All configurations managed through Git repositories with commit tracking
- Multi-Level Management: Manage individual machines and complete Kubernetes clusters
- Declarative Configuration: Define infrastructure state using Kubernetes Custom Resources
- Reproducibility: Every system state is tied to specific Git commits for full reproducibility
- Safe Operations: Clean state management with safe deletion procedures
- Two Application Modes: Full OS installation and existing system updates
NICO + NIO operates at three levels:
- Machine Level: Manage individual physical or virtual machines (NIO Level)
- Configuration Level: Apply NixOS configurations to machines (NIO Level)
- Cluster Level: Provision and manage complete Kubernetes clusters (NICO Level)
- Kubernetes cluster (v1.20+)
- Kubectl configured
- Target machines accessible via SSH
# Apply CRDs
kubectl apply -f crds/
# Install the operator
kubectl apply -f deployment.yaml- Create a Machine:
kubectl apply -f examples/machine-example.yaml- Apply Configuration:
kubectl apply -f examples/nixosconfiguration-example.yaml- Create Kubernetes Cluster:
kubectl apply -f examples/kubernetescluster-example.yamlRepresents physical or virtual machines with SSH connectivity.
Defines NixOS configurations to be applied to machines from Git repositories.
Manages complete Kubernetes clusters with control plane and worker nodes.
- Usage Guide - Complete usage instructions and examples
- Configuration Reference - Detailed configuration options for all CRDs
- Development Guide - Development and debugging setup
Check the examples/ directory for:
- Machine definitions
- NixOS configuration examples
- Kubernetes cluster configurations
- Nix flake configurations
NICO/
├── main.py # Main operator entry point
├── clients.py # Kubernetes client utilities
├── kubernetescluster_handlers.py # Kubernetes cluster handlers
├── requirements.txt # Python dependencies
├── crds/ # Custom Resource Definitions
│ ├── machine.yaml
│ ├── nixosconfiguration.yaml
│ └── kubernetescluster.yaml
├── examples/ # Example configurations
│ ├── machine-example.yaml
│ ├── nixosconfiguration-example.yaml
│ └── kubernetescluster-example.yaml
├── nix/ # NixOS configurations
│ ├── flake.nix
│ └── nodes/
├── scripts/ # Helper scripts
└── deployment.yaml # Operator deployment
Check operator status:
kubectl get machines,nixosconfigurations,kubernetesclusters --all-namespaces[Add your license information here]
[Add contribution guidelines here]