Installing Neutree on Kubernetes through NodePort
When installing Neutree in a Kubernetes cluster by using Helm, the default configuration creates LoadBalancer type services for the API, model gateway, VictoriaMetrics, and Grafana. If the Kubernetes cluster does not support LoadBalancer services, you can configure all these services as NodePort type services.
Solution
Section titled “Solution”-
Edit the
values.yamlfile of the Helm chart, and add or modify the following configuration:api:service:type: NodePortkong:proxyService:type: NodePortvictoria-metrics-cluster:vminsert:service:type: NodePortgrafana:service:type: NodePort -
Install the Neutree by using the modified
values.yamlfile:Terminal window helm install neutree neutree-<version>-enterprise.tgz \-f values.yaml \--namespace=neutree \--create-namespace -
After the installation is complete, run the following command to view the NodePort ports assigned by Kubernetes to each service:
Terminal window kubectl get svc -n neutreeneutree-api-serviceis used to access the Neutree management interface,neutree-kong-proxyis used to access inference services,neutree-victoria-metrics-cluster-vminsertis used to receive monitoring metrics, and the Grafana service is used to access the monitoring interface. When accessing a service, use the NodePort port shown in the command output and the IP address of any Kubernetes node. It is recommended to use the IP address of a Kubernetes control plane node first. -
Manually update the external access addresses in the
neutree-coreandneutree-apiDeployments.Replace
<node_ip>with the Kubernetes node IP address, and replace<kong_nodeport>,<vminsert_nodeport>, and<grafana_nodeport>with the corresponding NodePort ports queried in the previous step.-
Edit the
neutree-coreDeployment:Terminal window kubectl edit deployment/neutree-core -n neutreeUpdate the following parameters in the container
args:--metrics-remote-write-url=http://<node_ip>:<vminsert_nodeport>/insert/0/prometheus/--gateway-proxy-url=http://<node_ip>:<kong_nodeport> -
Edit the
neutree-apiDeployment:Terminal window kubectl edit deployment/neutree-api -n neutreeUpdate the following parameter in the container
args:--grafana-url=http://<node_ip>:<grafana_nodeport> -
Confirm that the Deployment rolling updates are complete:
Terminal window kubectl rollout status deployment/neutree-core -n neutreekubectl rollout status deployment/neutree-api -n neutree
-