diff --git a/src/content/docs/aws/enterprise/kubernetes/concepts.md b/src/content/docs/aws/enterprise/kubernetes/concepts.md index c287608a..f3aa54c8 100644 --- a/src/content/docs/aws/enterprise/kubernetes/concepts.md +++ b/src/content/docs/aws/enterprise/kubernetes/concepts.md @@ -91,6 +91,11 @@ In a Kubernetes deployment: This enables applications running in Kubernetes to interact with LocalStack using standard AWS SDK endpoint resolution without additional configuration. +## Storage + +LocalStack can store data that persists across sessions, such as data that can be used for [local persistence](https://docs.localstack.cloud/aws/capabilities/state-management/persistence/) or caching downloaded resources between sessions. See the [LocalStack volume](/aws/capabilities/config/filesystem/#localstack-volume) page for more information. + +This volume directory can be created in Kubernetes using a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) and associated [Persistent Volume Claim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims). This volume should be mounted into the pod at `/var/lib/localstack` to persist LocalStack state. See the [Operator](/aws/enterprise/kubernetes/kubernetes-operator/) and [Helm Chart](/aws/enterprise/kubernetes/deploy-helm-chart) documentation for specific details. ## Choose execution mode diff --git a/src/content/docs/aws/enterprise/kubernetes/deploy-helm-chart.md b/src/content/docs/aws/enterprise/kubernetes/deploy-helm-chart.md index a990f4b2..4c072d8b 100644 --- a/src/content/docs/aws/enterprise/kubernetes/deploy-helm-chart.md +++ b/src/content/docs/aws/enterprise/kubernetes/deploy-helm-chart.md @@ -157,6 +157,10 @@ persistence: This is especially useful for workflows where you seed resources or rely on state across restarts. ::: +This performs these two changes: +* sets `PERSISTENCE=1`, and +* creates a psrsistent volume claim for the (customizable) storage class. + ### Set Pod resource requests and limits diff --git a/src/content/docs/aws/enterprise/kubernetes/kubernetes-operator.md b/src/content/docs/aws/enterprise/kubernetes/kubernetes-operator.md index b0e47fe3..c409698e 100644 --- a/src/content/docs/aws/enterprise/kubernetes/kubernetes-operator.md +++ b/src/content/docs/aws/enterprise/kubernetes/kubernetes-operator.md @@ -223,6 +223,35 @@ curl http://1d4b6907.execute-api.localstack-localstack.my-namespace:4566/json This works without additional DNS configuration in client applications. +## Storage + +:::note +Requires Operator version 0.4.0 or later. +::: + +To persist the [LocalStack volume](/aws/capabilities/config/filesystem/#localstack-volume), use the `spec.pvcName` to specify the PVC you want to mount. This automatically mounts the PVC at `/var/lib/localstack`. + +For example: + +```yaml +# pvc definition +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: myPvc +spec: + # ... + +# LocalStack instance definition +apiVersion: api.localstack.cloud/v1alpha1 +kind: LocalStack +metadata: + name: localstack + namespace: my-namespace +spec: + # ... + pvcName: myPvc +``` ## Update @@ -261,4 +290,4 @@ Ensure that: * Each LocalStack instance requires its **own auth token** * The Operator supports **LocalStack Pro images only** * DNS integration and Cloud Pod automation are Operator-exclusive features -::: \ No newline at end of file +:::