@@ -45,6 +45,24 @@ Architecture overview
4545
4646--------------
4747
48+ 0. Environment variables (optional)
49+ -----------------------------------
50+
51+ If you have a custom Kubernetes environment, you can specify its configuration here
52+ (the values below are the current defaults).
53+
54+ .. code :: bash
55+
56+ # .env
57+ HP_K8S_NAMESPACE=" nextcloud-exapps"
58+ HP_K8S_STORAGE_CLASS=" "
59+ HP_K8S_DEFAULT_STORAGE_SIZE=" 10Gi"
60+ HP_K8S_BEARER_TOKEN_FILE=" /var/run/secrets/kubernetes.io/serviceaccount/token"
61+
62+ .. code :: bash
63+
64+ source .env
65+
4866 .. _scaling-kubernetes-setup-step-1 :
4967
50681. Create the kind Cluster
@@ -160,15 +178,16 @@ From the HaRP repository root:
160178
161179.. code :: bash
162180
163- cd ~ /nextcloud /HaRP
181+ cd path/to /HaRP
164182 bash development/redeploy_host_k8s.sh
165183
166184 The script will:
167185
168186 1. Auto-detect the k8s API server URL
169187 2. Generate a fresh bearer token
170- 3. Build the HaRP Docker image
171- 4. Start HaRP with k8s backend enabled on host network
188+ 3. Connect the Nextcloud network to the cluster network
189+ 4. Build the HaRP Docker image
190+ 5. Start HaRP with k8s backend enabled on host network
172191
173192Wait for HaRP to become healthy:
174193
@@ -204,6 +223,11 @@ your container ID or name, and ``<GATEWAY_IP>`` with the gateway from
204223 --k8s_expose_type=nodeport \
205224 --set-default
206225
226+ .. note ::
227+
228+ While the ``--harp_frp_address `` is a required argument for the ``docker `` command,
229+ it is not used by Kubernetes at all.
230+
207231Verify:
208232
209233.. code :: bash
@@ -397,15 +421,26 @@ Clean up all ExApp resources
397421 Reset everything
398422~~~~~~~~~~~~~~~~
399423
424+ Remove the deploy daemon config:
425+
400426.. code :: bash
401427
402- # Remove daemon config
403428 docker exec < NC_CONTAINER> sudo -E -u www-data php occ app_api:daemon:unregister k8s_local
404429
405- # Delete kind cluster
430+ .. note ::
431+
432+ Optionally, add the ``--rm-data `` option to also delete the associated PVC (Persistent Volume Claim).
433+
434+ Delete the ``kind `` cluster:
435+
436+ .. code :: bash
437+
406438 kind delete cluster --name nc-exapps
407439
408- # Remove HaRP container
440+ Remove the HaRP container:
441+
442+ .. code :: bash
443+
409444 docker rm -f appapi-harp
410445
411446 Then start again from :ref: `Step 1<scaling-kubernetes-setup-step-1> `.
0 commit comments