arangodb / kube-arangodb

ArangoDB Kubernetes Operator - Start ArangoDB on Kubernetes in 5min
https://arangodb.github.io/kube-arangodb/
Apache License 2.0
228 stars 71 forks source link

What's wrong with these configuration files? And how to make PV and the PVC work? #1530

Closed raphael10-collab closed 11 months ago

raphael10-collab commented 11 months ago

My Environment

The PV I defined do not get Bound, and the corresponding PVC are stuck in Pending State. What mistakes did I make in the definition of the Persistent Volumes and in the definition of the Deployment?

pv :

root@k8s-eu-1-control-plane-node-1:~# kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                    STORAGECLASS                   REASON   AGE
arango-pv-agent-worker-1                   160Gi      RWO            Delete           Available                            local-storage-arango                    13m
arango-pv-agent-worker-2                   160Gi      RWO            Delete           Available                            local-storage-arango                    13m
arango-pv-agent-worker-3                   160Gi      RWO            Delete           Available                            local-storage-arango                    13m
arango-pv-db-server-control-plane-node-1   200Gi      RWO            Delete           Available                            local-storage-arango                    13m
arango-pv-db-server-control-plane-node-2   200Gi      RWO            Delete           Available                            local-storage-arango                    13m
arango-pv-db-server-control-plane-node-3   200Gi      RWO            Delete           Available                            local-storage-arango                    13m
nats-pv-jetstream-worker-1                 10Gi       RWO            Delete           Bound       default/nats-js-nats-1   local-storage-nats-jetstream            39h
nats-pv-jetstream-worker-2                 10Gi       RWO            Delete           Bound       default/nats-js-nats-2   local-storage-nats-jetstream            39h
nats-pv-jetstream-worker-3                 10Gi       RWO            Delete           Bound       default/nats-js-nats-0   local-storage-nats-jetstream            39h

pvc :

root@k8s-eu-1-control-plane-node-1:~# kubectl get pvc
NAME                                 STATUS    VOLUME                       CAPACITY   ACCESS MODES   STORAGECLASS                   AGE
arangodb-cluster-agent-hb19gk5k      Pending                                                          local-storage-arango           13m
arangodb-cluster-agent-jrw0tvqf      Pending                                                          local-storage-arango           13m
arangodb-cluster-agent-z4ydysh3      Pending                                                          local-storage-arango           13m
arangodb-cluster-dbserver-1juawyoz   Pending                                                          local-storage-arango           13m
arangodb-cluster-dbserver-gzpccr6b   Pending                                                          local-storage-arango           13m
arangodb-cluster-dbserver-ioa5kirs   Pending                                                          local-storage-arango           13m
nats-js-nats-0                       Bound     nats-pv-jetstream-worker-3   10Gi       RWO            local-storage-nats-jetstream   39h
nats-js-nats-1                       Bound     nats-pv-jetstream-worker-1   10Gi       RWO            local-storage-nats-jetstream   39h
nats-js-nats-2                       Bound     nats-pv-jetstream-worker-2   10Gi       RWO            local-storage-nats-jetstream   39h

pods :

root@k8s-eu-1-control-plane-node-1:~# kubectl get pods
NAME                                                          READY   STATUS                  RESTARTS   AGE
arango-kube-arangodb-1-1701880568-operator-6f678c7d7d-xt5q5   1/1     Running                 0          17h
arangodb-cluster-agnt-hb19gk5k-5c22df                         0/1     Pending                 0          13m
arangodb-cluster-agnt-jrw0tvqf-5c22df                         0/1     Pending                 0          13m
arangodb-cluster-agnt-z4ydysh3-5c22df                         0/1     Pending                 0          13m
arangodb-cluster-crdn-bhyioyj7-5c22df                         0/1     Init:InvalidImageName   0          13m
arangodb-cluster-crdn-yazag5w7-5c22df                         0/1     Init:InvalidImageName   0          13m
arangodb-cluster-crdn-zyaka3tu-5c22df                         0/1     Init:InvalidImageName   0          13m
arangodb-cluster-prmr-1juawyoz-5c22df                         0/1     Pending                 0          13m
arangodb-cluster-prmr-gzpccr6b-5c22df                         0/1     Pending                 0          13m
arangodb-cluster-prmr-ioa5kirs-5c22df                         0/1     Pending                 0          13m
nats-0                                                        2/2     Running                 0          39h
nats-1                                                        2/2     Running                 0          39h
nats-2                                                        2/2     Running                 0          39h
nats-box-59cd9d6db7-wqkkf                                     1/1     Running                 0          39h

These are the configuration files I defined :

root@k8s-eu-1-control-plane-node-1:~# ls -lah ArangoDBConfig/
total 40K
drwxr-xr-x  2 root root 4.0K Dec  7 10:53 .
drwx------ 22 root root 4.0K Dec  7 09:52 ..
-rw-r--r--  1 root root  625 Dec  7 10:40 arango-deployment.yaml
-rw-r--r--  1 root root  261 Dec  6 16:48 arango-local-storage-class.yaml
-rw-r--r--  1 root root  486 Dec  7 09:51 arango-pv-agent-worker-1.yaml
-rw-r--r--  1 root root  486 Dec  7 09:59 arango-pv-agent-worker-2.yaml
-rw-r--r--  1 root root  486 Dec  7 09:52 arango-pv-agent-worker-3.yaml
-rw-r--r--  1 root root  517 Dec  7 09:51 arango-pv-db-server-control-plane-node-1.yaml
-rw-r--r--  1 root root  517 Dec  7 09:51 arango-pv-db-server-control-plane-node-2.yaml
-rw-r--r--  1 root root  517 Dec  7 09:51 arango-pv-db-server-control-plane-node-3.yaml

arango-local-storage-class.yaml :

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local-storage-arango
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

arango-pv-db-server-control-plane-node-1.yaml :

apiVersion: v1
kind: PersistentVolume
metadata:
  name: arango-pv-db-server-control-plane-node-1
spec:
  storageClassName: local-storage-arango
  local:
    path: /root/arango/db-server
  capacity:
    storage: 200Gi
  volumeMode: Filesystem
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - k8s-eu-1-control-plane-node-1

arango-pv-agent-worker-1.yaml :

apiVersion: v1
kind: PersistentVolume
metadata:
  name: arango-pv-agent-worker-1
spec:
  storageClassName: local-storage-arango
  local:
    path: /root/arango/agent
  capacity:
    storage: 160Gi
  volumeMode: Filesystem
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - k8s-eu-1-worker-1

arango-deployment.yaml :

apiVersion: "database.arangodb.com/v1"
kind: "ArangoDeployment"
metadata:
  name: "arangodb-cluster"
spec:
  mode: Cluster
  environment: Production
  agents:
    count: 3
    args:
      - --log.level=debug
    resources:
      requests:
        storage: 240Gi
    storageClassName: local-storage-arango
    accessModes:
      - ReadWriteOnce
    volumeMode: Filesystem
  dbservers:
    count: 3
    resources:
      requests:
        storage: 300Gi
    storageClassName: local-storage-arango
    accessModes:
      - ReadWriteOnce
    volumeMode: Filesystem
  coordinators:
    count: 3
  image: "arangodb/arangodb:3.11.6"

What's wrong with these configuration files? And how to make PV and the PVC work?

ajanikow commented 11 months ago

Hello!

The current Operator does not support CRI-O 1.27+. We will work on the fix (you can use any other solution).

Best Regards, Adam.