# Nstance: Next-Gen VM Auto-Scaler

> A faster alternative to traditional Auto-Scaling Groups (ASGs), replacing glue scripts and complexity with a cloud-agnostic VM provisioner for AWS, Google Cloud, and Proxmox with optional Kubernetes support.

- Website: https://nstance.dev/
- GitHub: https://github.com/nstance-dev/nstance
- LLMs.txt: https://nstance.dev/llms.txt

## Documentation

- [Motivation](https://nstance.dev/docs/motivation.md): Background context on why Nstance was created
- [Architecture](https://nstance.dev/docs/architecture.md): Overview of the Nstance architecture, components, and how they interact.
- [Getting Started](https://nstance.dev/docs/getting-started.md): Get started with Nstance quickly.

### Features

> Key features of the Nstance platform.

- [Auto-Scaling](https://nstance.dev/docs/features/auto-scaling.md): How Nstance automatically reconciles instance groups to maintain desired capacity.
- [Certificates](https://nstance.dev/docs/features/certificates.md): TLS certificate issuance, renewal, and management for instances.
- [Health Monitoring](https://nstance.dev/docs/features/health-monitoring.md): Agent health reports, unhealthy node detection, and automatic instance replacement.
- [Spot Instances](https://nstance.dev/docs/features/spot-instances.md): Automatic detection and handling of spot and preemptible instance termination notices.
- [Instance Expiry](https://nstance.dev/docs/features/instance-expiry.md): Automatic instance rotation based on configurable age limits for compliance and security.
- [Load Balancers](https://nstance.dev/docs/features/load-balancers.md): Automatic registration and deregistration of instances with cloud provider load balancers.
- [On-Demand Nodes](https://nstance.dev/docs/features/on-demand-nodes.md): Provisioning individual instances on-demand via Pod annotations for specific workload requirements.
- [Multi-Tenancy](https://nstance.dev/docs/features/multi-tenancy.md): How multiple Kubernetes clusters can run on a single Nstance cluster with tenant isolation.
- [Subnet Pools](https://nstance.dev/docs/features/subnet-pools.md): Logical subnet pool system that maps human-readable names to provider-specific subnet IDs for portable group configurations.

### Components

> Core components of the Nstance architecture: Server, Agent, Operator, and Admin.

- [Nstance Server](https://nstance.dev/docs/components/nstance-server.md): The core control plane component responsible for configuration management, leader election, instance provisioning, health monitoring, and API services.
- [Nstance Agent](https://nstance.dev/docs/components/nstance-agent.md): A lightweight agent running on each VM instance, handling registration, health reporting, certificate management, and spot instance detection.
- [Nstance Operator](https://nstance.dev/docs/components/nstance-operator.md): A Kubernetes operator that syncs Cluster API resources to Nstance Servers, managing instance groups, drain coordination, and on-demand nodes.
- [Nstance Admin](https://nstance.dev/docs/components/nstance-admin.md): Command-line and HTTP API tool for managing Nstance clusters, including bootstrap operations, configuration management, and group scaling.

### Providers

> Cloud and infrastructure provider integrations for Nstance.

- [AWS](https://nstance.dev/docs/providers/aws.md): How Nstance integrates with AWS services including EC2, S3, Secrets Manager, and Elastic Load Balancing.
- [Google Cloud](https://nstance.dev/docs/providers/google-cloud.md): How Nstance integrates with Google Cloud services including Compute Engine, Cloud Storage, Secret Manager, and load balancing.
- [Proxmox VE](https://nstance.dev/docs/providers/proxmox.md): How Nstance integrates with Proxmox VE for on-premise virtual machine lifecycle management.

### Reference

> Detailed reference documentation for Nstance internals and configuration.

- [OpenTofu / Terraform](https://nstance.dev/docs/reference/opentofu-terraform.md): OpenTofu/Terraform modules for deploying Nstance infrastructure across AWS and Google Cloud.
- [Files & Certificates](https://nstance.dev/docs/reference/files-and-certificates.md): How Nstance Server generates and sends files & certificates to Nstance Agent
- [Secrets Management](https://nstance.dev/docs/reference/secrets-management.md): Encryption key management, CA private keys, and secure secret distribution to instances.
- [Data Storage](https://nstance.dev/docs/reference/data-storage.md): Object storage layout, SQLite caching, and data persistence model.
- [Security](https://nstance.dev/docs/reference/security.md): Security model including mTLS authentication, certificate management, and encryption.
- [Leader Election](https://nstance.dev/docs/reference/leader-election.md): How Nstance Server uses object storage-based leader election for shard and cluster leadership.
- [Instance Lifecycle](https://nstance.dev/docs/reference/instance-lifecycle.md): Instance provisioning, registration, health monitoring, drain coordination, and deletion.
- [Server Configuration](https://nstance.dev/docs/reference/server-config.md): Detailed reference for all Nstance Server configuration options.
- [Templates & Vars](https://nstance.dev/docs/reference/templates-and-vars.md): Instance templates, variable hierarchy, userdata templates, and args merge strategy.
- [Server API](https://nstance.dev/docs/reference/server-api.md): gRPC API services exposed by the Nstance Server for agent and operator communication.
- [Cluster API Integration](https://nstance.dev/docs/reference/cluster-api.md): How Nstance implements the Cluster API (CAPI) infrastructure provider contract for infrastructure management in Kubernetes.
- [Operator Internals](https://nstance.dev/docs/reference/operator-internals.md): Internal architecture of the Nstance Operator: sync mechanics, reconciliation loops, drain coordination, CRDs, and connection management.

### Development

> Setting up development environments for working on Nstance.

- [Local Development Setup](https://nstance.dev/docs/development/local-setup.md): Setting up and running the full Nstance development environment locally with simulated infrastructure.
- [Development with Kind](https://nstance.dev/docs/development/dev-with-kind.md): Running the Nstance operator against a Kind (Kubernetes in Docker) cluster for development and testing.

---

Tip: Append `.md` to any page URL to get the markdown version.
