Challenge 4: Deploy your own frontend web client and Service

Previous Challenge Next Challenge

Introduction

Deploy a Fleet of GameServers to your Agones cluster and manage it. A Fleet is a managed set of Game Servers; Fleets manage Game Servers similar to how Deployments manage Pods.

Description

Your task is to deploy an Agones Fleet of Space Agon gameservers in Google Cloud and play test it with your team. This will require you to do the following:

  • Write and apply a fleet.yaml file for Space Agon to deploy 2 game servers in your cluster.
  • Write an allocation.yaml and create the allocator in your Agones cluster.

Note You must ALWAYS use kubectl create with the allocator.yaml file, kubectl apply will not work.

Note An allocator flags a game server so kubernetes knows not to delete it unless explicitly told to. It is most commonly used to flag that a game server has players on it, and will protect that server from scale down operations.

Success Criteria

  • GKE shows your Fleet has all game servers running and ready.
  • Demonstrate that you can scale your Fleet to 5 game servers using kubectl commands.
  • GKE shows one of the game servers in your Fleet has been allocated.
  • Demonstrate you can play a game on the allocated server by first connecting to http://<YOUR-FRONTEND-IP> and then clicking Connect to Server and providing your GameServers IP address and port. and that that allocation flag disappears in GKE when all players have disconnected.

Tips

  • Skeleton templates for fleet.yaml and allocator.yaml file have been provided in the GitHub repository.
  • Fleet and GameServer yaml files are very similar. Leverage your work from the previous challenge.
  • The default yaml examples in the Agones documentation will NOT work as is. Make sure to connect the dots.

Learning Resources

Previous Challenge Next Challenge