故障自愈Graph
Nebula Operator调用NebulaGraph集群提供的接口,动态地感知服务是否正常运行。当NebulaGraph集群中某一组件停止运行时,Nebula Operator会自动地进行容错处理。本文通过删除NebulaGraph集群中1个Storage服务Pod,模拟集群故障为例,说明Nebular Operator如何进行故障自愈。
前提条件Graph
Graph
操作步骤Graph
-
创建NebulaGraph集群。具体步骤参考Graph。
-
待所有Pods都处于
Running
状态时,模拟故障,删除名为<cluster_name>-storaged-2
Pod。kubectl delete pod <cluster-name>-storaged-2 --now
<cluster_name>
为NebulaGraph集群的名称。 -
Nebula Operator自动创建名为
<cluster-name>-storaged-2
的Pod,以修复故障。执行
kubectl get pods
查看<cluster-name>-storaged-2
Pod的创建状态。... nebula-cluster-storaged-1 1/1 Running 0 5d23h nebula-cluster-storaged-2 0/1 ContainerCreating 0 1s ...
当... nebula-cluster-storaged-1 1/1 Running 0 5d23h nebula-cluster-storaged-2 1/1 Running 0 4m2s ...
<cluster-name>-storaged-2
的状态由ContainerCreating
变为Running
时,说明自愈成功。
最后更新: September 29, 2021