mirror of https://github.com/knative/docs.git
Add details for storage and knative services (#5605)
* add details for storage and knative services * fixes * Update storage.md add missing whitespace --------- Co-authored-by: Reto Lehmann <retocode@icloud.com>
This commit is contained in:
parent
a65dbda136
commit
d60f9cacf0
|
|
@ -131,6 +131,7 @@ nav:
|
|||
# TODO: Add security section to docs?
|
||||
- Configure resource requests and limits: serving/services/configure-requests-limits-services.md
|
||||
- HTTPS redirection: serving/services/http-protocol.md
|
||||
- Volume Support: serving/services/storage.md
|
||||
- Traffic management: serving/traffic-management.md
|
||||
- Configuring gradual rollout of traffic to Revisions: serving/rolling-out-latest-revision.md
|
||||
- Tag resolution: serving/tag-resolution.md
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
# Volume Support for Knative services
|
||||
|
||||
By default Serving supports the mounting the [volume types](https://kubernetes.io/docs/concepts/storage/volumes): `emptyDir`, `secret`, `configMap` and `projected`. [PersistentVolumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) are supported but require a [feature flag](../configuration/feature-flags.md) to be enabled.
|
||||
|
||||
!!! warning
|
||||
Mounting large volumes may add considerable overhead to the application's start up time.
|
||||
|
||||
|
||||
Here is an example of using a persistent volume claim with a Knative Service:
|
||||
|
||||
```yaml
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
...
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
...
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: mydata
|
||||
readOnly: false
|
||||
volumes:
|
||||
- name: mydata
|
||||
persistentVolumeClaim:
|
||||
claimName: knative-pv-claim
|
||||
readOnly: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: knative-pv-claim
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
```
|
||||
Loading…
Reference in New Issue