部署方式:本地minikube自建k8s集群,版本1.23 使用helm部署
参考文档:使用 Helm 部署NebulaGraph集群 - NebulaGraph Database 手册
k8s版本:
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.0", GitCommit:"ab69524f795c42094a6630298ff53f3c3ebab7f4", GitTreeState:"clean", BuildDate:"2021-12-07T18:09:57Z", GoVersion:"go1.17.3", Compiler:"gc", Platform:"linux/amd64"}
pod状态:
service状态:
连接命令:
kubectl run -ti --image vesoft/nebula-console:v3.5.0 --restart=Never – nebula-console -addr 10.105.13.150 -port 9669 -u root -p vesoft
报错信息:
If you don’t see a command prompt, try pressing enter.
2023/10/08 02:23:41 Fail to initialize the connection pool, host: 10.105.13.150, port: 9669, failed to open connection, error: failed to open transport, error: dial tcp 10.105.13.150:9669: connect: connection refused
panic: Fail to initialize the connection pool, host: 10.105.13.150, port: 9669, failed to open connection, error: failed to open transport, error: dial tcp 10.105.13.150:9669: connect: connection refused
service配置,与帮助文档少了spec.externalTrafficPolicy,原因是加上这个版本的k8s在type是ClusterIP时不支持externalTrafficPolicy
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/cluster: nebula
app.kubernetes.io/component: graphd
app.kubernetes.io/managed-by: nebula-operator
app.kubernetes.io/name: nebula-graph
name: nebula-graphd-svc
namespace: default
spec:
ports:
- name: thrift
port: 9669
protocol: TCP
targetPort: 9669
- name: http
port: 19669
protocol: TCP
targetPort: 19669
selector:
app.kubernetes.io/cluster: nebula
app.kubernetes.io/component: graphd
app.kubernetes.io/managed-by: nebula-operator
app.kubernetes.io/name: nebula-graph
type: ClusterIP
storage用的是minikube提供的默认的standard