This package contains the Custom Resource Definitions (CRDs) for the PlayM8s gaming platform, a Kubernetes-native gaming infrastructure.
PlayM8s is a Kubernetes-based platform for managing game servers at scale. This package defines the custom resources used by the platform:
- Gameserver - Represents a deployed game server instance
- GameserverBase - Defines the base configuration for a game server
- GameserverOverlay - Provides overlay configurations that can be applied to a GameserverBase
A Gameserver represents a deployed instance of a game server. It combines a GameserverBase with zero or more GameserverOverlays to create a complete game server configuration.
Key specifications:
- Game: The game type (e.g., csgo)
- GameserverBase: Reference to the base configuration
- GameserverOverlays: List of overlays to apply
- StorageClassName: Storage class for persistence
- StorageStrategy: Strategy for storage management
A GameserverBase defines the foundational configuration for a specific game type. Multiple Gameserver instances can be created from the same base.
Key specifications:
- Game: The game type (e.g., csgo)
- StorageClassName: Storage class for persistence
- StorageStrategy: Strategy for storage management
A GameserverOverlay provides additional configuration that can be layered on top of a GameserverBase to customize specific instances.
Key specifications:
- Game: The game type (e.g., csgo)
- StorageClassName: Storage class for persistence
- StorageStrategy: Strategy for storage management
To install the CRDs in your Kubernetes cluster:
kubectl apply -f crds/Or using the provided script:
./entrypoint.shOnce installed, you can create PlayM8s resources in your Kubernetes cluster:
apiVersion: pm8s.io/v1
kind: Gameserver
metadata:
name: my-game-server
spec:
Game: csgo
GameserverBase: csgo-base
GameserverOverlays:
- csgo-overlay-1
- csgo-overlay-2
StorageClassName: fast-ssd
StorageStrategy: raw- Node.js >= 24.0.0
- Kubernetes cluster for testing
- kubectl configured for your cluster
npm install
npm run buildCRDs are generated from the TypeScript definitions using Pepr:
cd src && npx pepr crd generate --output ../crdsnpm run lintnpm publishThis project is licensed under CC-BY-SA-4.0.