-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add details for storage and knative services #5605
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,43 @@ | ||||||||||
# Configuring storage for Knative services | ||||||||||
|
||||||||||
Knative Serving integrates with K8s storage capabilities via supporting a subset of ephemeral storage volumes and via PersistentVolumeClaims(PVCs) volume types. | ||||||||||
In detail Knative Serving supports emptyDir by default, secret, configmap, projection and PVCs volume types. | ||||||||||
For more details on volume configuration check the related [feature flags](../configuration/feature-flags.md) when applicable. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
Here is an example of using PVCs: | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
```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 | ||||||||||
``` | ||||||||||
|
||||||||||
The example assumes that the user has enabled PVC support via the corresponding feature flag. | ||||||||||
|
||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can drop this since we mention it above
Suggested change
|
||||||||||
!!! warning | ||||||||||
Mounting large volumes may add considerable overhead to the application's start up time. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd consider moving this before the example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.