### Install Shulker using Helm Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/installation.md Clone the Shulker repository, checkout a specific version, navigate to the Helm chart directory, and install using Helm. Replace `` with the desired version tag. ```bash $ git clone https://github.com/jeremylvln/Shulker $ cd Shulker $ git checkout $ cd kube/helm $ helm install -n shulker-system . ``` -------------------------------- ### Adding Plugins via Direct URL and Maven Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/adding-custom-content.md Configure Shulker to download plugins from both direct URLs and Maven repositories. This example shows how to add two plugins to a MinecraftServerFleet. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: config: plugins: - url: https://example.com/my-plugin.jar - urlFrom: mavenRef: repositoryUrl: https://example.com/maven groupId: com.example artifactId: myplugin version: '1.0.0' credentialsSecretName: example-repo-secret ``` -------------------------------- ### Create a Batch MatchmakingQueue Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/addons/matchmaking.md Define a MatchmakingQueue resource to target a MinecraftServerFleet. This example uses the built-in 'Batch' algorithm for grouping players and specifies minimum and maximum player counts for matches. ```yaml apiVersion: matchmaking.shulkermc.io/v1alpha1 kind: MatchmakingQueue metadata: name: free-for-all spec: targetFleetRef: name: free-for-all mmf: builtIn: type: Batch minPlayers: 8 maxPlayers: 12 ``` -------------------------------- ### Apply Shulker manifests with kubectl Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/installation.md Apply pre-rendered YAML manifests for Shulker installation. The `stable.yaml` manifest provides a default configuration. Ensure you are in the correct directory or provide the full path to the manifest. ```bash $ kubectl apply -f stable.yaml -n shulker-system ``` -------------------------------- ### Shulker Proxy Agent Logs Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Example log output from a Shulker proxy agent. These logs indicate the agent has identified the Shulker proxy and is managing its lifecycle, including a force stop timer. ```log [io.shulkermc.serveragent.BootstrapPlugin]: Identified Shulker proxy: shulker-tutorial/public-xxx-xxx [io.fabric8.kubernetes.client.dsl.internal.VersionUsageUtils]: The client is using resource type 'proxies' with unstable version 'v1alpha1' [io.shulkermc.serveragent.BootstrapPlugin]: Proxy will be force stopped in 86400 seconds [io.fabric8.kubernetes.client.dsl.internal.VersionUsageUtils]: The client is using resource type 'minecraftservers' with unstable version 'v1alpha1' ``` -------------------------------- ### Create Kubernetes Namespace Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Create a dedicated Kubernetes namespace to isolate resources for this tutorial. This simplifies cleanup by allowing deletion of all related resources by removing the namespace. ```bash $ kubectl create ns shulker-tutorial ``` -------------------------------- ### Delete Tutorial Namespace Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md If a dedicated namespace was used for the tutorial, delete the entire namespace to clean up all associated resources. ```bash $ kubectl delete ns shulker-tutorial ``` -------------------------------- ### Apply MinecraftServerFleet Configuration Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Apply the `minecraftserver.yaml` file to create the MinecraftServerFleet resource in your Kubernetes cluster. ```bash $ kubectl apply -f minecraftserver.yaml -n shulker-tutorial ``` -------------------------------- ### Observe Server Registration Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Check the Shulker Agent logs to confirm that the newly created Minecraft server has been automatically registered. ```text [io.shulkermc.serveragent.BootstrapPlugin]: Registering server 'limbo-xxx-xxx' to directory ``` -------------------------------- ### Mounting Additional Volumes to MinecraftServer Pods Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/overriding-pod-properties.md Inject additional volumes and volume mounts into MinecraftServer Pods using `spec.podOverrides.volumeMounts` and `spec.podOverrides.volumes`. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServer metadata: name: my-server spec: clusterRef: name: my-cluster podOverrides: // [!code focus] volumeMounts: - name: my-extra-volume // [!code focus] mountPath: /mnt/path // [!code focus] volumes: - name: my-extra-volume // [!code focus] emptyDir: {} // [!code focus] ``` -------------------------------- ### Define MinecraftServerFleet Resource Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Create a `minecraftserver.yaml` file to define the MinecraftServerFleet. This specifies the cluster, replica count, server version, and configuration. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: lobby spec: clusterRef: name: getting-started replicas: 1 template: spec: clusterRef: name: getting-started tags: - lobby version: channel: Paper name: '1.20.2' config: {} ``` -------------------------------- ### Direct URL for Content Download Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/adding-custom-content.md Use a direct URL to download files. Ensure the URL points directly to the file and does not involve authentication layers. ```yaml url: https://example.com/my-file.tar.gz ``` -------------------------------- ### Enable Matchmaking Addon via Helm Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/addons/matchmaking.md Enable the Shulker Matchmaking addon by setting the 'enabled' flag to true in your Helm values.yaml file. This deploys the director and mmf components. ```yaml shulker-addon-matchmaking: enabled: true ``` -------------------------------- ### Setting Custom Node Affinities and Tolerations Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/overriding-pod-properties.md Customize Pod scheduling behavior by defining custom node affinities and tolerations within `spec.template.spec.podOverrides` for MinecraftServerFleet. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: // [!code focus] podOverrides: // [!code focus] affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: devops.example.com/gameserver // [!code focus] operator: In // [!code focus] values: - my-server // [!code focus] tolerations: - key: "devops.example.com/gameserver" // [!code focus] operator: "Equal" // [!code focus] value: "my-server" // [!code focus] effect: "NoSchedule" // [!code focus] ``` -------------------------------- ### Use a Custom Matchmaking Function Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/addons/matchmaking.md Configure a MatchmakingQueue to use a custom matchmaking function by specifying the host and port of your gRPC server. This allows for custom player grouping algorithms. ```yaml apiVersion: matchmaking.shulkermc.io/v1alpha1 kind: MatchmakingQueue metadata: name: free-for-all spec: targetFleetRef: name: free-for-all mmf: provided: host: my-mmf port: 9876 ``` -------------------------------- ### Specify Custom Server JAR in MinecraftServerFleet Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/using-custom-server-jar.md This snippet shows how to configure a custom server JAR by providing its URL within the `customJar.url` field in the `MinecraftServerFleet` CRD. Ensure the `version.channel` is still specified. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: // [!code focus] version: // [!code focus] channel: Paper // [!code focus] name: 1.20.0 // [!code focus] customJar: // [!code focus] url: https://example.com/custom-jar.jar // [!code focus] ``` -------------------------------- ### Adding Maps via Tar-Gzip URL Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/adding-custom-content.md Configure Shulker to download and extract a tar-gzipped archive for server maps. This is useful for minigame servers or ephemeral environments. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: config: world: url: https://example.com/my-worlds.tar.gz ``` -------------------------------- ### Enable Proxy Protocol in ProxyFleet Configuration Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/enabling-proxy-protocol.md Set the `proxyProtocol` option to `true` within the `config` section of your `ProxyFleet` specification. This allows the proxy to receive the real client IP address from the load balancer. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: ProxyFleet metadata: name: proxy spec: clusterRef: name: my-cluster replicas: 1 template: spec: config: // [!code focus] proxyProtocol: true // [!code focus] ``` -------------------------------- ### Adding Environment Variables to MinecraftServerFleet Pods Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/overriding-pod-properties.md Inject custom environment variables into MinecraftServerFleet Pods by specifying them under `spec.template.spec.podOverrides.env`. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: // [!code focus] podOverrides: // [!code focus] env: - name: OPENMATCH_HOST // [!code focus] value: open-match-frontend.open-match.svc // [!code focus] - name: OPENMATCH_PORT // [!code focus] value: '50504' // [!code focus] ``` -------------------------------- ### Apply MinecraftCluster Resource Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Apply the defined MinecraftCluster resource to your Kubernetes cluster. This action initiates the Shulker Operator's process for managing the cluster. ```bash $ kubectl apply -f cluster.yaml -n shulker-tutorial ``` -------------------------------- ### Applying Patches via Tar-Gzip URLs Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/adding-custom-content.md Configure Shulker to apply patches by downloading and extracting tar-gzipped archives. Patches are applied in the order specified and can overwrite existing files. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftServerFleet metadata: name: my-server spec: clusterRef: name: my-cluster replicas: 1 template: spec: config: patches: - url: https://example.com/my-first-patch.tar.gz - url: https://example.com/my-second-patch.tar.gz ``` -------------------------------- ### Maven Repository for JAR Archives Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/adding-custom-content.md Download JAR files from a Maven repository. Specify the repository URL, group ID, artifact ID, and version. Optionally, provide a secret name for credentials. ```yaml urlFrom: mavenRef: repositoryUrl: https://example.com/maven groupId: com.example artifactId: myplugin version: '1.0.0' credentialsSecretName: example-repo-secret ``` -------------------------------- ### Delete Proxy and Cluster Resources Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Delete the Proxy and Cluster resources using their respective YAML files. ```bash $ kubectl delete -f proxy.yaml $ kubectl delete -f cluster.yaml ``` -------------------------------- ### Define ProxyFleet Resource Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Define a ProxyFleet resource in YAML to manage proxy instances for player connections. This resource specifies the cluster it belongs to, the number of replicas, and service configuration. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: ProxyFleet metadata: name: public spec: clusterRef: name: getting-started replicas: 1 service: type: LoadBalancer externalTrafficPolicy: Local template: spec: version: channel: Velocity name: latest config: {} ``` -------------------------------- ### Define Network Administrators in MinecraftCluster Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/recipes/defining-network-administrators.md Set the `networkAdmins` option in your `MinecraftCluster` resource to a list of player UUIDs. These players will be granted all permissions on the proxies and servers. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftCluster metadata: name: cluster spec: networkAdmins: // [!code focus] - 29b2b527-1b59-45df-b7b0-d5ab20d8731a // [!code focus] ``` -------------------------------- ### Define MinecraftCluster Resource Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Define the core MinecraftCluster resource in a YAML file. This is the central entity that other Shulker resources will reference. ```yaml apiVersion: shulkermc.io/v1alpha1 kind: MinecraftCluster metadata: name: getting-started spec: {} ``` -------------------------------- ### Apply ProxyFleet Resource Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Apply the defined ProxyFleet resource to your Kubernetes cluster. This will trigger the creation of proxy Pods and a Kubernetes Service of type LoadBalancer. ```bash $ kubectl apply -f proxy.yaml -n shulker-tutorial ``` -------------------------------- ### Delete MinecraftServerFleet Source: https://github.com/jeremylvln/shulker/blob/main/docs/src/latest/guide/getting-started/your-first-cluster.md Delete the MinecraftServerFleet resource using its YAML file. ```bash $ kubectl delete -f minecraftserver.yaml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.