部署集群到kubernetes上metad和storaged无法正常运行

  • nebula 版本:
  • 部署方式(分布式 ):kubernetes三个工作节点专门用来部署
  • 硬件信息:
    4核16g三台,磁盘用的动态存储类挂载的aws的ebs卷

具体操作如下:
k8s三台node:

kubectl  label node node01 nebula="yes"
kubectl  label node node02 nebula="yes"
kubectl  label node node03 nebula="yes"
#安装
wget https://github.com/vesoft-inc/nebula/archive/master.zip 
unzip master.zip 

更改nebula-master/kubernetes/helm/values里面的MetadHosts为三个节点的ip,更改存储类为aws的ebs动态类,更改namespace为db,然后

helm install nebula-master/kubernetes/helm,

状态

三个nebula-graphd正常启动,

一个nebula-metad重启几次后CrashLoopBackOff(另外两个pending,没有调度到机器上):报错如下,

++ hostname -i
+ exec /usr/local/nebula/bin/nebula-metad --flagfile=/usr/local/nebula/etc/nebula-metad.conf --local_ip=172.31.21.56 --v=0 --minloglevel=2 --daemonize=false
*** Aborted at 1610543651 (unix time) try "date -d @1610543651" if you are using GNU date ***
PC: @     0x7f107f25285d __GI_nanosleep
*** SIGTERM (@0x0) received by PID 1 (TID 0x7f10800b09c0) from PID 0; stack trace: ***
    @          0x1caef51 (unknown)
    @     0x7f107f56a62f (unknown)
    @     0x7f107f25285d __GI_nanosleep
    @     0x7f107f2526f3 __sleep
    @           0xf913c8 initKV()
    @           0xf674a1 main
    @     0x7f107f1af554 __libc_start_main
    @           0xf8fe0d (unknown)

一个nebula-storaged-1正常启动,另外两个也是pending状态,没有调度到工作机器上



你贴下metad的日志,看是不是端口冲突导致起不来了。

你那边检查一下 PV 和 PVC 的状态是否正常,首先排除磁盘没有正确挂载的可能。

cc @kevin.qiao


pvc已经正常挂载了,我配置的是aws的ebs


只有这个日志输出

截图里Pending的pod有看到日志输出吗,describe一下确定没有继续调度的原因,还有helm里配置的镜像版本号。麻烦把pvc data-nebula-storaged-0跟data-nebula-metad-0分别挂载到一个pod上取下日志,方便我们定位问题,谢谢

类似的问题。
nebula 版本:v1.0.0
部署方式(分布式 ):kubernetes三个工作节点专门用来部署 ,使用helm管理

硬件信息:
Linux version 4.4.168-1.el7.elrepo.x86_64 * 3
128G 32G 32G

状态
三个nebula-graphd正常启动,nebula-metad 和 nebula-storaged 一开始处于running状态,没有启动陈成功,反复restart,最后 CrashLoopBackOff
WeChatWorkScreenshot_a9e56943-fed6-4e32-b46d-f700da2c89db

nebula-storaged 一直在进行心跳检测,应该是由于 metad 服务没起来所以起不起来。

nebula-metad 服务报错如下

helm配置中用的是默认端口

livenessProbe:
  graphd:
    Enable: true
  metad:
    Enable: true 
  storaged:
    Enable: true 

## Optional resource requests and limits for the nebula container
resources: 
  graphd:
    limits:
      cpu: 1000m
      memory: 1024Mi
    requests:
      cpu: 1000m
      memory: 1024Mi

  metad:
    limits:
      cpu: 1000m
      memory: 1024Mi
    requests:
      cpu: 1000m
      memory: 1024Mi
  
  storaged:
    limits:
      cpu: 1000m
      memory: 1024Mi
    requests:
      cpu: 1000m
      memory: 1024Mi

replication:
  ## Number of nebula-storaged replicas
  storaged:
    replicas: 3
  ## Number of nebula-metad replicas
  metad: 
    replicas: 3
  ## Number of nebula-graphd replicas
  graphd: 
    replicas: 3

port:
  ## Service And Container Port Setting of Nebula-Graphd  
  graphd:
    serviceType: ClusterIP 
    thriftPort: 3699
    httpPort: 13000 
    http2Port: 13002 
  ## Service And Container Port Setting of Nebula-Storaged  
  storaged:
    serviceType: ClusterIP 
    thriftPort: 45600 
    raftPort: 45601 
    httpPort: 12000
    http2Port: 12002 
  ## Service And Container Port Setting of Nebula-Metad  
  metad:
    serviceType: ClusterIP 
    thriftPort: 44500 
    raftPort: 44501 
    httpPort: 11000
    http2Port: 11002

MetadHosts:
  - 172.27.128.72:45500
  - 172.27.233.16:45500
  - 172.16.32.135:45500

## Storage Setting of Nebula-Metad and Nebula-Storaged
storage:
  storageClass: fast-disks
  storaged:
    size: 20Gi 
  metad:
    size: 20Gi 

nodeSelector: 
  nebula: "yes"

tolerations: []

affinity: {}

另外 PV 和 PVC 是自己创建的,挂载状态好像没问题

麻烦给看一下

metad跟storaged使用的是hostNework方式吗,如果是需要确定部署机器上44500端口没有其他服务占用,这3个节点间通信没有问题。这些依次检查过后,排除掉网络因素,再挂载pvc到一个pod上检查日志。
另外我看你的values.yaml配置有些问题

metad:
    serviceType: ClusterIP 
    thriftPort: 44500 
    raftPort: 44501 
    httpPort: 11000
    http2Port: 11002

MetadHosts:
   - 172.27.128.72:45500 <-------------应该是44500,配置错误?
   - 172.27.233.16:45500
   - 172.16.32.135:45500
1 个赞

MetadHosts 端口配置确实有问题,非常感谢