1

I created the Yaml (Deploy, PV, PVC, and Service) files for flowable to run on AKS. It's running and I can see the flowable browser UI. The problem is that when I start a process and the process has a form to upload the file, here I am getting an error /data/uncategorized/a6506912-816c-11ea-8c98-e20c3b5b12e4 (No such file or directory)

Here are my YAML files

Deployment:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: null
  generation: 1
  labels:
    k8s-app: flowable-app
  name: flowable-app
  selfLink: /apis/extensions/v1beta1/namespaces/ingress-basic/deployments/flowable-app
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: flowable-app
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        k8s-app: flowable-app
      name: flowable-app
    spec:
      containers:
      - env:
        - name: FLOWABLE_CONTENT_STORAGE_ROOT-FOLDER
          value:  /data
        - name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
          value: org.postgresql.Driver
        - name: SPRING_DATASOURCE_URL
          value: jdbc:postgresql://0.0.0.0:5432/flowable
        - name: SPRING_DATASOURCE_USERNAME
          value: xxxxx
        - name: SPRING_DATASOURCE_PASSWORD
          value: xxxxx
        - name: FLOWABLE_COMMON_APP_IDM-ADMIN_USER
          value: admin
        - name: FLOWABLE_COMMON_APP_IDM-ADMIN_PASSWORD
          value: test
        - name: FLOWABLE_COMMON_APP_IDM-REDIRECT-URL
          value: http://1.1.1.1:8080/flowable-idm
        - name: FLOWABLE_COMMON_APP_REDIRECT_ON_AUTH_SUCCESS
          value: http://1.1.1.1:8080/flowable-task/
        volumeMounts:
        - mountPath:  /data
          name: flowable-data
        image: xxxxx
        imagePullPolicy: Always
        name: flowable-app
        resources: {}
        securityContext:
          privileged: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      volumes:
      - name: flowable-data
        persistentVolumeClaim:
          claimName: flowable-volume-claim
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: regcred
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status: {}

PersistentVolume and PersistentVolumeClaim:

kind: PersistentVolume
apiVersion: v1
metadata:
  name: flowable-volume
  labels:
    type: local
    app: flowable-app
spec:
  storageClassName: managed-premium
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data/flowable/data"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: flowable-volume-claim
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: managed-premium
  resources:
    requests:
      storage: 5Gi

Service:

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  labels:
    k8s-app: flowable-app
  name: flowable-app
  selfLink: /api/v1/namespaces/ingress-basic/services/flowable-app
spec:
  externalTrafficPolicy: Cluster
  ports:
  - name: tcp-4000-4000-bj5xg
    nodePort: 31789
    port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    k8s-app: flowable-app
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}
Ravindra Gupta
  • 1,256
  • 12
  • 42
  • Have you tried to exec into the pod and check if the volume `/data` is correctly mounted and if you can read/write on it? `/data/uncategorized/` exists? – Mark Watney Apr 21 '20 at 09:29
  • @mWatney `/data` mounted but, it's not creating and directory inside it – Ravindra Gupta Apr 21 '20 at 09:41
  • You mean that you can't create it even manually? Try `touch /data/file; ls -l /data` and post the output please. – Mark Watney Apr 21 '20 at 09:44
  • I'm not very used to AKS but as far as I know you don't need to create the PersistentVolume. Once you create the PersistentVolumeClaim, the PersistentVolume will be created automatically. Try removing both, the PV and the PVC and recreate only the PVC. Than, you check if both are created with `kubectl get pv,pvc`. – Mark Watney Apr 21 '20 at 09:47
  • @mWatney, I tried to create a file inside the data directory, output: `bash-4.4$ cd data bash-4.4$ touch file touch: file: Permission denied`. permission denied – Ravindra Gupta Apr 21 '20 at 10:22
  • Have you checked my 3rd commend regarding the PVC? – Mark Watney Apr 21 '20 at 10:33
  • The [documentation](https://learn.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv#create-a-persistent-volume-claim) is confirming my theory. If you chose to use managed-premium, you don't need to create the PV, AKS will create it for you. – Mark Watney Apr 21 '20 at 10:38
  • no success, I delete both PVC and PV and recreated only PVC, but the error still on. – Ravindra Gupta Apr 21 '20 at 10:55
  • It created the PV automatically for you? Can you share the output for `kubectl get pv,pvc`? – Mark Watney Apr 21 '20 at 11:00
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/212150/discussion-between-ravindra-gupta-and-mwatney). – Ravindra Gupta Apr 21 '20 at 11:02

0 Answers0