a minecraft server kubernetes operator.
this is a kubernetes operator that allows for easy provisioning of minecraft servers, written in haskell.
it lives in a kubernetes cluster and watches for MinecraftInstance
crd instances.
upon creation / update of a MinecraftInstance
crd instance in a namespace, it will create / update the following in that namespace:
- kubernetes
StatefulSet
with 1 replica for the minecraft server itself- the container image used comes from https://github.com/itzg/docker-minecraft-server
- kubernetes
Service
(of typeNodePort
for now) to front the minecraft server
upon deletion of a MinecraftInstance
, the operator will clean up the above.
the definition of the crd can be found at ./manifests/crd.yaml. here's an example of one you'd create yourself:
apiVersion: jali-clarke.ca/v1
kind: MinecraftInstance
metadata:
name: my-minecraft-server
namespace: some-namespace
spec:
minecraftVersion: 1.2.5
nodePortService:
name: my-minecraft-service
nodePort: 25565
- implement everything described in the previous section
- deployment method for everything described in the previous section, including documentation for deployment
- minecraft server proxy to allow for spin up / shutdown of minecraft server pods via
StatefulSet
based on number of players connected - be more flexible in
Service
type. what if we want aLoadBalancer
type service?
- allow multiple operators in the same cluster. this can take the any / all / none of the following forms:
- namespaced operator installation
- operators manage resources based on label or annotation
- some third option?