Nakama
This installation guide walks through the steps for installing Nakama to your Kubernetes clusters using Argonaut.
Nakama is an open-source, scalable server for social and real-time games and apps.
With a Nakama server, you can add user authentication, social networking, storage, and real-time data exchange into your apps and games. It is developed by Heroic Labs to handle the difficult but essential services that go into all social and real-time games and apps.
If you aren’t familiar with Nakama, please check out their getting started guide.
Pre-requisites
- Argonaut account
- Connected AWS/GCP account with an active k8s cluster
Installation steps
Database setup
- Navigate to your environment
- Click on the
Infra
tab - Click on
Resource +
and setup a Postgres (GCP) / RDS-Postgres (AWS) instance. - Enter the details and click on
Deploy
.💡 Heroiclabs’ page here uses Postgres 12.2. However, since RDS 12 is going to be deprecated next year; we recommend you pick the latest version (15.x).
- You will find your instance address under the outputs tab of your newly created instance. Copy it, as you will need it later.
Deploying Nakama
In the cluster, if you want to run nakama
- Go to your Environment from the sidebar
- Navigate to
Apps
>Cluster
>Application +
> choose From Library. - Your chosen cluster and environment are pre-filled.
- Under configuration,
- select
Custom apps
- namespace - same as
cluster name
- release name - this is the app instance name, it can be
nakama
if you don't have multiple instances in the same cluster. - chart name
stateless
- repo URL https://raw.githubusercontent.com/argonautdev/charts/v0.6.6/dist
- In the
values.yaml
, replace the following parts as shown below. - Ensure you replace the
database.address
with the copied value from Potgres/RDS instance created above.
- select
- Click on
Deploy
to deploy the application. This could take up to 2 minutes. - Once deployed, you should see the nakama app in your cluster's Add-ons section.
version: "v1"
appName: "nakama" #release name
image: "registry.heroiclabs.com/heroiclabs/nakama"
imageTag: "3.16.0"
services:
- port: 7349
protocol: "http"
- port: 7350
protocol: "http"
- port: 7351
protocol: "tls-terminated"
external:
hosts:
- "nakamaconsole.exampledomain.com"
paths: ["/"]
clusterIssuer: letsencrypt-prod
extraAnnotations: {}
persistentStorage:
[] # Set to [] if no persistent storage is required
# - capacity: "1000M"
# mountPath: "/usr/share/appdata"
# accessMode: "ReadWriteOnce" # ReadWriteOnce and ReadOnlyMany are supported
resources:
requests:
cpu: "100m"
memory: "200M"
command: ["sh", "-ecx", "/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama && exec /nakama/nakama --name nakama1 --database.address postgres:localdb@postgres:5432/nakama --logger.level DEBUG --session.token_expiry_sec 7200"]