Orchestrators
Run game servers on a Kubernetes cluster instead of on a daemon node.
An orchestrator is an agent that connects BadgerPanel to one Kubernetes cluster.
What an orchestrator does
It runs on the cluster machine as a system service and holds a connection to your panel. It sends a heartbeat every 30 seconds and carries out what the panel asks of the cluster.
Each orchestrator looks after one cluster. The panel finds that cluster on its own once the orchestrator connects, so you never add a cluster by hand.
Where to find them
- Go to Admin > Kubernetes, which lists your clusters.
- Click the Orchestrators tab at the top.
Nodes or orchestrators
| Item | Daemon nodes | Orchestrators |
|---|---|---|
| Ports | Addresses and ports you add yourself. | Chosen for each server. |
| Storage | Local disk on the node. | Cluster storage. |
| Growing | Add another node. | The cluster spreads the load for you. |
| Setup | Install the daemon on every machine. | Install one orchestrator for each cluster. |
| Suits | Dedicated machines, bare metal and a VPS. | Cloud, and a cluster you already run. |
What the machine needs
- Linux with systemd. Ubuntu, Debian, CentOS and RHEL all work.
- Root access, or sudo.
- Outbound HTTPS from the machine to your panel.
You do not need a cluster first. The installer can build one for you.
Adding an orchestrator
- Go to Admin > Kubernetes and click the Orchestrators tab.
- Click Add Orchestrator.
- Enter a Name that tells you which machine it is.
- Choose which Kubernetes to install.
- Pick a cluster under Kubernetes cluster (optional), or leave it unassigned for a new machine.
- Click Create Orchestrator.
Choosing your Kubernetes
| Choice | What it does |
|---|---|
| k3s | One install that includes networking and a load balancer. Suits a single machine. |
| Kubernetes (kubeadm) | Upstream Kubernetes. Also installs the container runtime and the network. |
| Already installed | Installs no cluster and uses the one on the machine. |
Pick k3s for a machine of its own, or Already installed to join a cluster you already run.
A cluster that is already on the machine is never replaced, whichever choice you make.
The panel then shows you an install command. Copy it.
WARNING
The token in that command lasts 24 hours. If yours expires, open the actions menu on the orchestrator card and click Regenerate Token.
Running the install command
Run it on the cluster machine, as root.
curl -sSL https://panel.example.com/api/orchestrators/TOKEN/install | sudo bashUse the command from your own panel, because it carries your panel address and your token.
The installer reads the machine, sets up Kubernetes as you asked, then registers with the panel. On k3s it removes Traefik, which BadgerPanel does not use.
It finishes with Installation Complete - Connected! or Installation INCOMPLETE - Not Connected.
Opening the firewall
The installer does not touch your firewall, so open these ports yourself.
| Port | Protocol | Purpose |
|---|---|---|
| 6443 | TCP | Cluster API. |
| 10250 | TCP | Node agent. |
| 8472 | UDP | Cluster network. |
| 30000-32767 | TCP and UDP | Game server ports. |
Open the game server range to your players. Keep 6443, 10250 and 8472 between your cluster machines only.
Reading the status
The Orchestrators tab counts the orchestrators in each state and shows a card for each one.
| Status | Meaning |
|---|---|
| Connected | It is talking to the panel. |
| Pending | Created, but it has not registered yet. The card carries the install command. |
| Disconnected | No heartbeat is arriving. Check the service is running. |
| Error | It reported a problem. Read its log. |
A connected card shows the uptime, how many commands it has run, the platform and the cluster it is linked to.
The card also names which Kubernetes it installed.
Looking after the service
# Is it running
systemctl status badger-orchestrator
# Follow the log
journalctl -u badger-orchestrator -f
# Restart it
systemctl restart badger-orchestrator
# Stop it
systemctl stop badger-orchestratorIt also writes to /var/log/badger-orchestrator/orchestrator.log.
When it will not connect
If the panel address in /etc/badger-orchestrator/config.yaml starts with http://, correct it.
sed -i 's|http://|https://|' /etc/badger-orchestrator/config.yaml
systemctl restart badger-orchestratorThen check the machine can reach your panel.
curl -I https://panel.example.com/api/healthUpdates
An orchestrator looks for a new version every hour, installs it and restarts itself. There is nothing to push from the panel.
Removing an orchestrator
Open the actions menu on its card and click Delete. What happens depends on the state.
- Another orchestrator manages the cluster. Your servers move across and keep running. The button reads Delete & Migrate.
- It is the last one on the cluster, and connected. Every server on that cluster goes, along with its storage and the cluster record. The button reads Delete Everything, and you have to type the orchestrator name.
- It is the last one on the cluster, and offline. The panel cannot reach the cluster to tidy up, so your servers keep running there. The button reads Delete Anyway.
DANGER
Delete Everything removes the game servers and their data. Move the servers first if you want to keep them.
After deleting an offline orchestrator, clear the cluster yourself.
kubectl delete namespace badger-servers
kubectl delete namespace badger-systemThen take the orchestrator off the machine.
systemctl stop badger-orchestrator
systemctl disable badger-orchestrator
rm -f /etc/systemd/system/badger-orchestrator.service
rm -f /usr/local/bin/badger-orchestrator
rm -rf /etc/badger-orchestrator
rm -rf /var/lib/badger-orchestrator
systemctl daemon-reloadNext steps
- Kubernetes clusters to manage the cluster and its settings
- Server management to create servers on it
