Do not add replicas to k8s for authoring notebooks

See #2826.
This commit is contained in:
José Valim 2024-10-11 11:47:30 +02:00 committed by Jonatan Kłosko
parent c066dee469
commit 7cd249c04b

View file

@ -63,7 +63,7 @@ kind: Service
metadata:
name: livebook-loadbalancer
spec:
type: LoadBalancer
type: ClusterIP
ports:
- port: 8080
targetPort: 8080
@ -77,7 +77,10 @@ kind: Deployment
metadata:
name: livebook
spec:
replicas: 3
# When deploying Livebook for authoring notebooks to Kubernetes,
# the number of replicas must be 1, since Livebook considers you
# will assign one instance per user.
replicas: 1
selector:
matchLabels:
app: livebook
@ -134,6 +137,8 @@ data:
LIVEBOOK_COOKIE: <base64_encoded_password>
```
The setup above does not set up a data directory, which means once you restart the instance, any configuration will be lost. If you have a persistent volume, you can point the `LIVEBOOK_DATA_PATH` environment variable to it.
## Deploy notebooks as applications
It is possible to deploy any notebook as an application in Livebook. Inside the notebook, open up the Application pane on the sidebar (with a rocket icon), click "Manual Docker deployment", and follow the required steps.