2

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
  • 827
  • 1
  • 10
  • 21
  • Could you please check if the `init-log` file is actually there? And also check the privileges? There is no info regarding any conflicts between ArangoDB and MicroK8s so it seems that the file cannot be created/accessed due to some privilege configuration misfit. – Wytrzymały Wiktor Nov 19 '19 at 14:10
  • 1
    `kubectl exec -it dbgraph-64c6fd9b84-hftdx -- /bin/sh` , `ls /tmp/init-log` returns `ls: /tmp/init-log: No such file or directory`. The only file in `/tmp/` is `arangod.conf`. – Bjorn Thor Jonsson Nov 19 '19 at 14:29
  • Another question: while using the Operator you mentioned, have you tried it with Helm also? – Wytrzymały Wiktor Nov 20 '19 at 12:50
  • 1
    Haven't tried it with Helm. Just found out that the official ArangoDB binary requires a CPU supporting SSE4.2 but the machine I'm trying this on only supports SSE3 (yes it's an ancient one) - so that may be causing the issue. Will report back when I've had the opportunity to set MicroK8s up on a machine supporting SSE4.2. Relevant links: https://github.com/arangodb/arangodb/issues/7705 ... https://github.com/arangodb/arangodb/issues/8135 – Bjorn Thor Jonsson Nov 22 '19 at 23:23
  • Thanks for the info and please do so. I will create an answer from both our findings and post it so the rest of the community could use it. – Wytrzymały Wiktor Nov 25 '19 at 10:43
  • Have you managed to make it work? – Wytrzymały Wiktor Dec 02 '19 at 08:45
  • No, I haven't as I don't have a SSE4.2 machine (with enough memory) to try this on at the moment. – Bjorn Thor Jonsson Dec 04 '19 at 10:11

1 Answers1

1
  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.

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37