I was trying to add a directory for mounting the configMap in the Deployment yaml of the Kubernetes artifact. Though I defined the volumes and the mountpath within the container, in the pod exec, I couldn't find the directory?
My deployment file looks like this:
apiVersion: v1
kind: Deployment
metadata:
  name: test-deployment
  namespace: test
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: reactor
    spec:
      containers:
      - name: reactor
        image: test/chain
        imagePullPolicy: Always
        volumeMounts:
        - mountPath: /test
          name: chaindata
        ports:
        - containerPort: 3003
      volumes:
      - configMap:
          name: chaindata
          defaultMode: 420
        name: chaindataI found my error, I was actually pointing to my app directory but the directory was already created in the root folder. Hence, I have changed the Mountpath in the deployment file from /test to src/lib/app/functionchain
Thanks for the concern