R8sCluster
R8sCluster — opinionated cluster foundation with all recommended operators.
R8sClusterExamples
Example 1
import { R8sCluster, Platform, App, Database } from '@r8s/recipes'
export default (
<>
<R8sCluster
secrets={{ mount: 'secret', path: 'production' }}
dns={{ server: 'ns1.example.com', zone: 'example.com', tsigPath: 'dns/tsig' }}
>
<Platform namespace="production">
<Database name="api-db" storage="20Gi" />
<App name="api" image="api:v1" host="api.example.com" />
</Platform>
</R8sCluster>
</>
)Props
secrets{ mount: string, path: string, authRef?: string }Required—OpenBao secrets backend configuration. VSO (Vault Secrets Operator) is declared automatically. This context is inherited by all children (App, Database, Auth, etc.) so credentials are managed by VSO — never plaintext.
dns{ server: string, zone: string, tsigPath: string, tsigKey?: string }Required—ExternalDNS configuration with TSIG for secure RFC 2136 updates. The external-dns operator is declared automatically, and a VaultStaticSecret is created for the TSIG key in the external-dns namespace.
gatewayClassNamestringOptional—Gateway class name for Envoy Gateway (default: 'eg'). The envoy-gateway operator is declared automatically.
labelsRecordOptional—Default labels applied to all resources.
operatorsOperator[]Optional—Pre-installed operators. R8sCluster won't re-declare these.
logsNamespacestringOptional—Namespace for LokiStack and logging resources (default: 'logging'). This is separate from app namespaces — logging infra lives in its own namespace.
logsStorageClassstringOptional—Storage class for Loki logs (default: 'standard').
childrenunknownOptional—Application components (App, Database, Auth, etc.). Children inherit routing, secrets, and DNS contexts. Optional — R8sCluster can be used standalone to set up cluster infrastructure without any apps.