question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Persistence path for Kubernetes?

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
nehakapila94commented, Apr 19, 2021

Tried changing mountpath to below and it worked. mountPath: /app/staticfiles

0reactions
harshmanvarcommented, Apr 20, 2021

@nehakapila94 thanks a lot for sharing the details and glad to hear that it’s working, maybe I can close this issue now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found