Skip to content
Neutree Documentation

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.

  1. Edit the values.yaml file of the Helm chart, and add or modify the following configuration:

    api:
    service:
    type: NodePort
    kong:
    proxyService:
    type: NodePort
    victoria-metrics-cluster:
    vminsert:
    service:
    type: NodePort
    grafana:
    service:
    type: NodePort
  2. Install the Neutree by using the modified values.yaml file:

    Terminal window
    helm install neutree neutree-<version>-enterprise.tgz \
    -f values.yaml \
    --namespace=neutree \
    --create-namespace
  3. 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 neutree

    neutree-api-service is used to access the Neutree management interface, neutree-kong-proxy is used to access inference services, neutree-victoria-metrics-cluster-vminsert is 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.

  4. Manually update the external access addresses in the neutree-core and neutree-api Deployments.

    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.

    1. Edit the neutree-core Deployment:

      Terminal window
      kubectl edit deployment/neutree-core -n neutree

      Update 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>
    2. Edit the neutree-api Deployment:

      Terminal window
      kubectl edit deployment/neutree-api -n neutree

      Update the following parameter in the container args:

      --grafana-url=http://<node_ip>:<grafana_nodeport>
    3. Confirm that the Deployment rolling updates are complete:

      Terminal window
      kubectl rollout status deployment/neutree-core -n neutree
      kubectl rollout status deployment/neutree-api -n neutree