ArangoDB won't run on MicroK8s

11/19/2019

Deploying ArangoDB to a MicroK8s cluster results in:

$ kubectl logs -f dbgraph-64c6fd9b84-chqkm
automatically choosing storage engine
Initializing database...Hang on...
ArangoDB didn't start correctly during init
cat: can't open '/tmp/init-log': No such file or directory

where the deployment declaration is:

apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  name: dbgraph
spec:
  replicas: 1
  selector:
    matchLabels:
      name: dbgraph
  strategy:
    type: Recreate
  template:
    metadata:
      creationTimestamp: null
      name: dbgraph
      labels:
        name: dbgraph
    spec:
      containers:
      - env:
        - name: ARANGO_NO_AUTH
          value: "1"
        image: arangodb:3.5
        name: dbgraph
        ports:
        - containerPort: 8529
        resources:
          limits:
            memory: "2Gi"
            cpu: 0.5
        volumeMounts:
        - mountPath: /var/lib/arangodb3
          name: dbdata-arangodb
      restartPolicy: Always
      volumes:
      - name: dbdata-arangodb
        persistentVolumeClaim:
          claimName: dbdata-arangodb-pvc
status: {}

the PersistentVolumeClaim is:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  name: dbdata-arangodb-pvc
spec:
  storageClassName: ""
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
status: {}

and the PersistentVolume declaration is:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: dbdata-arangodb-pv
  labels:
    type: local
spec:
  storageClassName: ""
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/disk5/k8s-peristent-volumes/test/arangodb"

Having a similar Deployment-with-volume-declaration -> PVC -> PV relationship works fine with other deployments, such as for Minio. I've also had luck with a similar setup for ArangoDB on GKE.

Could this be an issue ArangoDB is having with the Kubernetes version?

$ microk8s.kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:13:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

I did try the ArangoDB Kubernetes Operator with no luck (but fine on GKE) - in that project's readiness state table it can be seen that at most Kubernetes version 1.14 is supported - so that is probably as expected.

How can I have ArangoDB running on a MicroK8s cluster?

-- Bjorn Thor Jonsson
arangodb
kubernetes
microk8s

1 Answer

12/10/2019
  1. The prerequisite for ArangoDB binary requires a CPU supporting SSE4.2.

  2. You can install ArangoDB on a MicroK8s cluster with a Helm.

microk8s.enable helm - Using Helm within Microk8s allows you to manage, update, share and rollback Kubernetes applications.

Here you can find a manual showing how to use the ArangoDB Kubernetes Operator with Helm.

Also, for the general guide I recommend this thread.

I hope it helps.

-- OhHiMark
Source: StackOverflow