ArangoDB无法在MicroK8上运行

gdx19jrr  于 2022-12-09  发布在  Go
关注(0)|答案(1)|浏览(147)

将ArangoDB部署到MicroK 8 s集群会导致:

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

持久卷声明为:

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。
这可能是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上很好)--在该项目的就绪状态表中,可以看到最多支持Kubernetes版本1.14--所以这可能是预期的。
如何让ArangoDB在MicroK 8 s集群上运行?

shyt4zoc

shyt4zoc1#

  1. ArangoDB二进制文件的先决条件要求CPU支持SSE4.2。
    1.您可以使用Helm在MicroK 8 s集群上安装ArangoDB。
    microk8s.enable helm-在Microk 8 s中使用Helm可以管理、更新、共享和回滚Kubernetes应用程序。
    Here您可以找到一本手册,说明如何使用ArangoDB Kubernetes Operator和Helm。
    此外,对于一般指南,我推荐this thread
    希望能帮上忙。

相关问题