# Development Notes ## Check that Kubernetes is reachable locally ```bash kubectl get nodes ``` ## Install the local Portabase Agent Helm chart ```bash helm install portabase-agent . \ --set env.EDGE_KEY= ``` ## Check the pods ```bash kubectl get pods ``` ## Check the services ```bash kubectl get svc ``` ## To update .env variables or JSON config: ```bash kubectl rollout restart deployment portabase-agent ``` ## Install or upgrade the Helm chart ```bash helm upgrade portabase-agent . \ --reuse-values \ --set env.EDGE_KEY="NEW_EDGE_KEY" ``` ## Rollout to restart ```bash kubectl rollout restart deployment portabase-agent ``` ## List pods to get the pod name ```bash kubectl get pods -l app=portabase-agent ``` ## Get logs for the pod ```bash kubectl logs portabase-agent-6f7d4f5c6b-abc12 ``` ## Uninstall Agent ``` bash helm uninstall portabase-agent ``` ## Mount a directory for a `files` source A `files` source backs up a directory the agent can see. Mount it into the pod with `extraVolumes` and `extraVolumeMounts`: ```yaml extraVolumes: - name: shared-files hostPath: path: /srv/files type: Directory extraVolumeMounts: - name: shared-files mountPath: /data/files ``` Mount it read-write: restores write into it. The `mountPath` (here `/data/files`) is the `path` to enter for the source in Portabase.