Persistence path for Kubernetes?
See original GitHub issueI have set up Postgres in Kubernetes and also setup Doccano in Kubernetes however it’s working well but wants to know the mount point for Kubernetes to attach Persistence volume.
My deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: doccano
name: doccano
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: doccano
tier: frontend
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: doccano
tier: frontend
spec:
containers:
- env:
- name: ADMIN_USERNAME
value: admin
- name: ADMIN_EMAIL
value: harsh.manvar@xxxxx.com
- name: ADMIN_PASSWORD
value: admin
- name: DATABASE_URL
value: postgres://root:2lnhK06u@postgres:5432/doccano?sslmode=disable
- name: ALLOW_SIGNUP
value : "True"
image: doccano/doccano
volumeMounts:
- name: doccano-data
mountPath: app/staticfiles
imagePullPolicy: Always
resources:
limits:
cpu: 300m
memory: 400Mi
requests:
cpu: 150m
memory: 128Mi
name: doccano
ports:
- containerPort: 8000
name: http
protocol: TCP
- containerPort: 80
name: https
protocol: TCP
volumes:
- name: doccano-data
persistentVolumeClaim:
claimName: doccano-data
right now i have used path : app/staticfiles
but when pod restarts it delete all the files inside it that means files are not persistent at this path.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Persistent Volumes | Kubernetes
A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using ...
Read more >Intro to Persistence in Kubernetes
So you want want to run stateful containers? Check out a brief intro to persistence in Kubernetes. Kubernetes and persistent storage go ...
Read more >Kubernetes Persistent Volumes | Tutorial and Examples
Persistent volume (PV) is a piece of storage provided by an administrator in a Kubernetes cluster. When a developer needs persistent storage for...
Read more >Persistent storage using hostPath - OpenShift Documentation
1, The name of the pod. · 2, The pod must run as privileged to access the node's storage. · 3, The path...
Read more >Kubernetes data persistence: from host-path to Longhorn
Data persistence, as the majority of concepts related to Kubernetes, is an enormous subject. And even though the usual recommendation for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tried changing mountpath to below and it worked. mountPath: /app/staticfiles
@nehakapila94 thanks a lot for sharing the details and glad to hear that it’s working, maybe I can close this issue now.