LogoTensorFusion Docs
LogoTensorFusion Docs
Homepage

Getting Started

OverviewKubernetes InstallVM/Server Install(K3S)Helm Quick InstallHost/GuestVM InstallTensorFusion Architecture

Application Operations

Create WorkloadAnnotation Usage ScenariosConfigure AutoScalingMigrate Existing WorkloadBest Practices

Customize AI Infra

Production-Grade DeploymentConfig QoS and BillingBring Your Own CloudManaging License

Maintenance & Optimization

Upgrade ComponentsSetup AlertsGPU Live MigrationPreload ModelOptimize GPU Efficiency

Troubleshooting

HandbookTracing/ProfilingQuery Metrics & Logs

Reference

Helm Install Values
Kubernetes EventsTensorFusion Metrics ReferenceBenchmark TestingCommand Line ReferenceGPU/Driver/OS Support MatrixTensorFusion Security Whitepaper

Comparison

Compare with NVIDIA vGPUCompare with MIG/MPSCompare with NVIDIA Run:aiCompare with HAMi
For System Admins

Command Line Reference

This page lists the command-line flags and environment variables of the TensorFusion binaries: the controller, the hypervisor, the hypervisor TUI, and the worker and client pieces that are injected into Pods. Use it when you customize the Helm chart or a component's Pod template.

All Go binaries accept flags with one or two dashes (-leader-elect and --leader-elect are the same). Boolean flags take the form -flag or -flag=false.

Controller

Binary /manager in the tensor-fusion-operator image. One process runs the CRD controllers, the Pod mutating webhook, the scheduler and an HTTP API.

The Helm chart starts it with:

/manager -metrics-bind-address :9000 -leader-elect -enable-auto-scale -enable-alert -enable-auto-expander

Change the command with the controller.command value.

Flags

FlagDefaultDescription
-leader-electfalseEnable leader election so that only one replica is active.
-enable-auto-scalefalseAdjust workers' TFLOPS and VRAM automatically from observed usage.
-enable-alertfalseEvaluate the alert rules in dynamicConfig.alertRules and send alerts to Alertmanager.
-enable-auto-expanderfalseAdd GPU nodes when Pods are pending for lack of GPU resources.
-alert-manager-addrhttp://alert-manager.tensor-fusion-sys.svc.cluster.local:9093Alertmanager address, including the scheme.
-compatible-with-nvidia-container-toolkitfalseWait for the NVIDIA Container Toolkit toolkit-ready validation before node discovery starts. Set by the chart value controller.compatibleWithNvidiaContainerToolkit.
-gpu-info-config/etc/tensor-fusion/gpu-info.yamlPath to the GPU model catalog (TFLOPS and price per model).
-dynamic-config/etc/tensor-fusion/config.yamlPath to the dynamic config file, rendered from the dynamicConfig Helm value.
-scheduler-config/etc/tensor-fusion/scheduler-config.yamlPath to the scheduler configuration, in KubeSchedulerConfiguration format.
-metrics-path/logs/metrics.logFile the controller appends metrics to. Vector tails this file.
-host-port-range40000-42000Port range for host ports assigned to pre-scheduled Pods such as vGPU workers.
-cluster-host-port-range42000-62000Port range for Pods annotated with tensor-fusion.ai/host-port: auto.
-health-probe-bind-address:8081Address of the /healthz and /readyz probes.
-metrics-bind-address0Address of the controller-runtime metrics endpoint. 0 disables it.
-metrics-securefalseServe the metrics endpoint over HTTPS.
-enable-http2falseEnable HTTP/2 on the metrics and webhook servers.
-v0Log verbosity (klog). Higher numbers log more.

The controller logs through klog, so the other standard klog flags (-logtostderr, -log_file, -vmodule and so on) also apply. The -zap-* flags of earlier releases no longer exist.

Environment variables

VariableDefaultDescription
OPERATOR_NAMESPACESet by the chart to the release namespaceNamespace the controller runs in.
TF_ISOLATION_MODE_POLICYstatic (the chart sets dynamic)static or dynamic. Decides whether a GPU is fixed to one isolation mode or may switch. The controller passes the same value to the hypervisors.
INITIAL_GPU_NODE_LABEL_SELECTORChart value initialGpuNodeLabelSelectorOne key=value label. Nodes that carry it are registered as GPU nodes.
TSDB_MYSQL_HOST127.0.0.1GreptimeDB host (MySQL protocol). Used by alerting and autoscaling.
TSDB_MYSQL_PORT4002GreptimeDB MySQL port.
TSDB_MYSQL_USERrootGreptimeDB user.
TSDB_MYSQL_PASSWORDemptyGreptimeDB password.
TSDB_MYSQL_DATABASEpublicGreptimeDB database.
ENABLE_WEBHOOKSenabledSet to false to run without the Pod webhook.
ENABLE_SCHEDULERenabledSet to false to run without the scheduler.
ENABLE_CR_CONTROLLERenabledSet to false to run without the CRD controllers.
NVIDIA_OPERATOR_PROGRESSIVE_MIGRATIONunsetSet to true to migrate step by step from the NVIDIA device plugin. Set by the chart value controller.nvidiaOperatorProgressiveMigration.
ENABLE_POD_RESOURCES_PROXYunsetSet to true to have hypervisors expose a kubelet PodResources proxy socket, which lets DCGM exporter attribute GPU metrics to TensorFusion Pods.
KUBECONFIGunsetPath to a kubeconfig file. Needed only when the controller runs outside the cluster.

Hypervisor

Binary hypervisor in the tensor-fusion-hypervisor image. The controller creates one hypervisor Pod per GPU node. Customize it through componentConfig.hypervisor.podTemplate in the GPUPool.

Flags

FlagDefaultDescription
-vendorNVIDIAAccelerator vendor. Overridden by TF_HARDWARE_VENDOR.
-accelerator-lib./provider/build/libaccelerator_example.soPath to the vendor accelerator library. Overridden by TF_ACCELERATOR_LIB_PATH.
-isolation-modesoftDefault isolation mode of the node: shared, soft, hard or partitioned. Overridden by TF_ISOLATION_MODE.
-isolation-policystaticstatic or dynamic. Overridden by TF_ISOLATION_MODE_POLICY.
-backend-typekuberneteskubernetes, or simple for a single machine without Kubernetes.
-discovery-interval12hHow often devices are rediscovered.
-metrics-output-pathmetrics.logFile the hypervisor appends metrics to.
-metrics-interval60sHow often GPU and worker usage is sampled.
-port8001Port of the hypervisor HTTP API. Overridden by HYPERVISOR_PORT.
-v0Log verbosity (klog).

For compatibility with v1 Pod templates, a leading daemon argument is accepted and ignored.

Subcommand mount-shm

hypervisor mount-shm mounts the tmpfs that holds the shared-memory files of soft isolation. The controller runs it in the privileged init-shm init container of every hypervisor Pod; you normally never call it yourself.

FlagRequiredDescription
--mount-pointYesDirectory to mount the tmpfs on. The controller passes /run/tensor-fusion/shm.
--sizeYesSize in MB. The controller passes 2048.

Environment variables

The controller sets the variables marked "injected". Set the others in the hypervisor Pod template when you need them.

VariableSourceDescription
GPU_NODE_NAMEInjectedName of the node, used to report GPUNode and GPU resources.
TENSOR_FUSION_POOL_NAMEInjectedName of the GPUPool the node belongs to.
HYPERVISOR_PORTInjectedHTTP API port. Takes precedence over -port.
TF_ISOLATION_MODE_POLICYInjectedstatic or dynamic, copied from the controller.
TF_HYPERVISOR_METRICS_FORMATInjectedMetrics line format, from dynamicConfig.metricsFormat.
DETECT_IN_USED_GPUSInjectedtrue during progressive migration, so GPUs already used by non-TensorFusion Pods are detected.
TF_HARDWARE_VENDOROptionalAccelerator vendor, for example NVIDIA or Ascend.
TF_ACCELERATOR_LIB_PATHOptionalFull path to the accelerator library. The chart sets /run/tensor-fusion/libaccelerator_nvidia.so.
TF_ISOLATION_MODEOptionalDefault isolation mode of the node.
KUBELET_CHECKPOINT_PATHOptionalPath to the kubelet device-manager checkpoint file, if it is not in the default location.
KUBECONFIGOptionalPath to a kubeconfig file, for running outside a Pod.
DISABLE_TENSOR_FUSION_TELEMETRYOptionalSet to any value to turn off anonymous usage telemetry. See the security whitepaper.

Hypervisor TUI

hypervisor-tui is a terminal UI for inspecting one hypervisor: devices, workers and live usage. It talks to the hypervisor HTTP API. It is not shipped in the images; build it from the tensor-fusion repository with make build-hypervisor-tui.

FlagDefaultDescription
-hostlocalhostHypervisor host.
-port8001Hypervisor HTTP port.
make build-hypervisor-tui
./bin/hypervisor-tui -host <node-ip> -port 8001

Worker

The worker serves GPU calls for remote vGPU and for hard isolation. The controller builds its command; you only see it when you read a worker Pod's spec.

ScenarioCommand set by the controller
Remote worker, TCP./tensor-fusion-worker -p 8000
Sidecar worker in the same Pod, shared memory./tensor-fusion-worker -n shmem -m tf_shm -M 2048
FlagDescription
-pTCP port the worker listens on.
-nTransport. shmem selects shared memory.
-mName of the shared-memory segment.
-MSize of the shared-memory segment in MB.
VariableDescription
TF_ENABLE_LOG1 enables worker logs. The controller sets it by default.
TF_CUDA_SM_PERCENT_LIMITCompute limit in percent, set for hard isolation. When the workload gives its limit in TFLOPS, the hypervisor converts it to a percentage of the allocated GPU.
TF_GPU_MEMORY_LIMITVRAM limit in MB, set for hard isolation. TF_CUDA_MEMORY_LIMIT carries the same value for older worker builds.

Client and limiter injection

The Pod webhook injects GPU libraries into containers that request TensorFusion resources. Nothing is preloaded through the LD_PRELOAD variable in application containers; the webhook mounts a generated /etc/ld.so.preload file instead, so every process in the container loads the library.

WorkloadWhat is injected
Local GPU, soft isolationInit container init-soft-limiter copies the vendor limiter (libcuda_limiter.so for NVIDIA) to /tensor-fusion-limiter. A second init container appends it to the image's own /etc/ld.so.preload.
Remote vGPU, or local GPU with a worker sidecarInit container inject-lib copies the client libraries to /tensor-fusion and generates /etc/ld.so.preload and /etc/ld.so.conf.d/zz_tensor-fusion.conf.
shared and partitioned isolationNothing.

Variables the webhook sets on application containers:

VariableValueDescription
TF_PREPEND_PATH/tensor-fusionDirectory prepended to PATH.
TF_LD_LIBRARY_PATH/tensor-fusionDirectory added to the library search path.
TENSOR_FUSION_OPERATOR_GET_CONNECTION_URLController URLWhere the client asks for its worker's address (remote vGPU).
TENSOR_FUSION_CONNECTION_NAME, TENSOR_FUSION_CONNECTION_NAMESPACEFrom the PodThe TensorFusionConnection that pairs the Pod with a worker (remote vGPU).
HYPERVISOR_IP, HYPERVISOR_PORTNode IP, 8001Address of the hypervisor on the same node (local GPU).
TF_ISOLATION_MODEsoftRead by the soft limiter.
TF_SHM_PATH/run/tensor-fusion/shm/shmShared-memory file the soft limiter reads its limits from.
POD_NAME, POD_NAMESPACE, CONTAINER_NAMEFrom the PodIdentify the container to the hypervisor.

To switch a built-in feature off for one Pod, use the tensor-fusion.ai/disable-features annotation with a comma-separated list:

ValueEffect
gpu-limiterDo not load the GPU limiter.
gpu-optTurn off CUDA call optimization in the client.
mem-managerTurn off the VRAM manager.
start-workerStart the worker container with sleep infinity instead of the worker process, for debugging.

Removed components

Earlier releases documented a separate node discovery binary (--hostname, --gpu-info-config, NODE_DISCOVERY_REPORT_GPU_NODE) and hypervisor flags --sock_path, --gpu_metrics_file and --scheduler. Device discovery now runs inside the hypervisor, and those flags no longer exist.

Benchmark Testing

Previous

GPU/Driver/OS Support Matrix

Supported GPU vendors, isolation modes, drivers, operating systems, and CPU architectures

Table of Contents

Controller
Flags
Environment variables
Hypervisor
Flags
Subcommand mount-shm
Environment variables
Hypervisor TUI
Worker
Client and limiter injection
Removed components