Skip to content

Commit a54989b

Browse files
committed
docs: update kubernetes instructions
When deploying on kubernetes, it is possible to deploy multiple replicas of the backend service. To do so, a couple fo environment variables have been added to instruct edgehog on how to find and connect to other nodes. Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
1 parent 5332503 commit a54989b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

backend/lib/edgehog/config.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ defmodule Edgehog.Config do
103103
type: ClusteringStrategy,
104104
default: :none
105105

106-
@envdoc "The endpoint label to query to get other edgehog instances. Defaults to `app=edgehog`."
106+
@envdoc "The endpoint label to query to get other edgehog instances. Defaults to `app=edgehog-backend`."
107107
app_env :edgehog_clustering_kubernetes_selector,
108108
:edgehog,
109109
:edgehog_clustering_kubernetes_selector,
110110
os_env: "EDGEHOG_CLUSTERING_KUBERNETES_SELECTOR",
111111
type: :binary,
112-
default: "app=edgehog"
112+
default: "app=edgehog-backend"
113113

114114
@envdoc "The Kubernetes namespace to use when `kubernetes` Erlang clustering strategy is used. Defaults to `edgehog`."
115115
app_env :clustering_kubernetes_namespace, :edgehog, :clustering_kubernetes_namespace,

doc/pages/admin/deploying_with_kubernetes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,15 @@ spec:
416416

417417
- name: ADMIN_JWT_PUBLIC_KEY_PATH
418418
value: /keys/admin_public.pem
419+
420+
# In case you want to deploy multiple edgehog-backend instances, it
421+
# is advised to configure the clustering strategy for edgehog.
422+
# - name: EDGEHOG_CLUSTERING_STRATEGY
423+
# value: kubernetes
424+
# - name: EDGEHOG_CLUSTERING_KUBERNETES_SELECTOR
425+
# value: app=edgehog-backend
426+
# - name: EDGEHOG_CLUSTERING_KUBERNETES_NAMESPACE
427+
# value: edgehog
419428
volumeMounts:
420429
- name: admin-public-key
421430
mountPath: /keys

0 commit comments

Comments
 (0)