Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor updates #323

Merged
merged 4 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/howtos/gameserverlogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ nav_order: 4

# Game server logging

Thundernetes does not do anything special to obtain the logs for your GameServer Pods, since there already are a lot of existing solutions in the Kubernetes ecosystem. One easy ways to accomplish this is to use [fluentbit](https://fluentbit.io/) to capture logs and send them to [Azure Blob Storage](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview) or on a Storage provide of your choice. Fluentbit supports multiple output providers, you can can see them [here](https://docs.fluentbit.io/manual/pipeline/outputs).
Thundernetes does not do anything special to obtain the logs for your GameServer Pods, since there already are a lot of existing solutions in the Kubernetes ecosystem. One easy way to accomplish this is to use [Fluent Bit](https://fluentbit.io/) to capture logs and send them to [Azure Blob Storage](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview) or on a Storage provide of your choice. Fluent Bit supports multiple output providers, you can can see them [here](https://docs.fluentbit.io/manual/pipeline/outputs).

You can use the following steps to setup fluentbit to capture logs from your GameServer Pods and send them to Azure Storage:
You can use the following steps to setup Fluent Bit to capture logs from your GameServer Pods and send them to Azure Storage:

- Set up an Azure Storage Account. Check [here](https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal) on how to do it using the Azure Portal.
- Install fluentbit on your Kubernetes cluster. Check [here](https://docs.fluentbit.io/manual/installation/kubernetes) on how to do it.
- As soon as you create the namespace and roles/role bindings, you should create the fluentbit ConfigMap containing the fluentbit configuration file. You can see a sample [here](https://github.com/PlayFab/thundernetes/blob/main/samples/fluentbit/fluent-bit-configmap.yaml). Remember to replace the values with your Azure Storage Account name and key.
- Finally, you should create the fluentbit DaemonSet, so a fluentbit Pod runs on every Node in your cluster and grabs the logs. You can find a sample [here](https://github.com/PlayFab/thundernetes/blob/main/samples/fluentbit/fluent-bit-ds.yaml).
- As soon as you create the namespace and roles/role bindings, you should create the Fluent Bit ConfigMap containing the Fluent Bit configuration file. You can see a sample [here](https://github.com/PlayFab/thundernetes/blob/main/samples/fluentbit/fluent-bit-configmap.yaml), these samples assume you created a namespace called `logging`. Remember to replace the values with your Azure Storage Account name and key.
- Finally, you should create the Fluent Bit DaemonSet, so a Fluent Bit Pod runs on every Node in your cluster and grabs the logs. You can find a sample [here](https://github.com/PlayFab/thundernetes/blob/main/samples/fluentbit/fluent-bit-ds.yaml). You can also follow their [official installation guide](https://docs.fluentbit.io/manual/installation/kubernetes), but you will have to edit their Helm Chart values to the ones in our [config map](https://github.com/PlayFab/thundernetes/blob/main/samples/fluentbit/fluent-bit-configmap.yaml).

From now on, the logs from all your pods, including your game servers, will start being uploaded to you Azure Storage Account. Try creating a Game Server Build and allocating a Game Server.
1 change: 0 additions & 1 deletion samples/fluentbit/fluent-bit-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ spec:
- name: fluent-bit-config
configMap:
name: fluent-bit-config
serviceAccountName: fluent-bit
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
Expand Down