ArangoDB无法在MicroK8上运行

时间:2019-11-19 00:41:27

标签: kubernetes arangodb microk8s

将ArangoDB部署到MicroK8s集群会导致:

$ 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

其中的部署声明为:

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: {}

PersistentVolume声明为:

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

,PersistentVolume声明为:

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"

具有类似的 Deployment-with-Volume-declaration-> PVC-> PV 关系可以与其他部署(例如Minio)一起很好地工作。我也很幸运在GKE上为ArangoDB建立了类似的设置。

这可能是ArangoDB在Kubernetes版本中遇到的问题吗?

$ 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"}

我确实没有运气尝试过ArangoDB Kubernetes Operator(但是在GKE上还不错)-在该项目的readiness state table中,可以看到最多支持Kubernetes 1.14版本-大概是可以预期的。

如何在MicroK8s集群上运行ArangoDB?

1 个答案:

答案 0 :(得分:0)

  1. ArangoDB二进制文件的前提条件是需要支持SSE4.2的CPU。

  2. 您可以使用Helm在MicroK8s群集上安装ArangoDB。

microk8s.enable helm-在Microk8s中使用Helm,可以管理,更新,共享和回滚Kubernetes应用程序。

Here,您可以找到一本手册,展示如何将ArangoDB Kubernetes Operator与Helm一起使用。

此外,对于一般指南,我建议使用this thread

我希望它会有所帮助。