> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracebloc.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bare-metal

> Deploy a tracebloc secure environment on your own on-prem Kubernetes cluster.

**When to pick it** — You already run Kubernetes on-prem (k3s, kubeadm, RKE, …) and want a secure environment on it, with full control over scheduling and storage.

## Prerequisites

* A running Kubernetes cluster and `kubectl` access.
* **Helm 3.14 or later** (Helm 4 works).
* `metrics-server` installed. The chart refuses to install without it, because the resource monitor reads `metrics.k8s.io`. On kubeadm and other clusters with self-signed kubelet certificates, start metrics-server with `--kubelet-insecure-tls`. If you can't install it, set `resourceMonitor.enabled: false` and the chart skips the resource monitor.
* The [tracebloc CLI](https://docs.tracebloc.io/environment-setup/cli.md#install), signed in (`tracebloc login`). It creates your secure environment's **Client ID** and password; see [Configuration → Authentication](https://docs.tracebloc.io/environment-setup/configuration.md#authentication).

## Install

```bash theme={null}
tracebloc client create --credential-file tb.env   # Client ID, password and namespace, see below
helm repo add tracebloc https://tracebloc.github.io/client
helm repo update
helm show values tracebloc/client > values.yaml   # edit per below
. ./tb.env
helm upgrade --install "$TRACEBLOC_NAMESPACE" tracebloc/client \
  -n "$TRACEBLOC_NAMESPACE" --create-namespace -f values.yaml
```

Before the last command, copy the Client ID and password from `tb.env` into `values.yaml` (see [Configuration → Authentication](https://docs.tracebloc.io/environment-setup/configuration.md#authentication)). The chart goes into the namespace `tb.env` names, with the release named after it: that is where tracebloc CLI commands on this machine look for your secure environment. Delete `tb.env` after the install.

## Verify

```bash theme={null}
kubectl get pods -n "$TRACEBLOC_NAMESPACE"
```

Pods `Running`, and on [My Secure Environment](https://ai.tracebloc.io/secure-environment) your secure environment reads **Active now** under its name.

## Environment-specific config

On a **single-node** cluster, use hostPath-backed volumes:

```yaml theme={null}
hostPath:
  enabled: true
pvcAccessMode: ReadWriteOnce
storageClass:
  create: true
  provisioner: kubernetes.io/no-provisioner
namespace:
  podSecurity:
    enforce: ""        # hostPath needs the privileged init-mysql-data container
clusterScope: true
```

hostPath means one node: the volumes are `ReadWriteOnce` directories on whichever node a pod lands on, so on a multi-node cluster, pods on different nodes see different data. For **multi-node** clusters, keep `hostPath.enabled: false`, set `storageClass.create: false` and set `storageClass.name` to a `ReadWriteMany` class (NFS, CephFS or similar).

* **GPU or CPU-only.** In the `env` block of `values.yaml`, declare what your nodes have. Without `GPU_LIMITS`, every training pod requests one NVIDIA GPU, and on CPU-only nodes it stays `Pending`:

  ```yaml theme={null}
  env:
    TRACEBLOC_DDP: "1"           # from the chart's env block; keep it
    GPU_LIMITS: ""               # CPU-only nodes. For NVIDIA GPUs: "nvidia.com/gpu=1"
  ```

  The chart's `values.yaml` writes `env` in braces (`env: { … }`), where a new line without a comma is a YAML error. Replace that whole block with the one above, and carry over any other keys you've set.

  With GPUs, use x86\_64 nodes with an NVIDIA GPU of the Turing generation or newer ([GPU support](https://docs.tracebloc.io/environment-setup/setup-guide.md#gpu-support)). The nodes also need the NVIDIA device plugin. Install it yourself, or let the chart run it:

  ```yaml theme={null}
  gpu:
    devicePlugin:
      enabled: true
      vendor: nvidia
  ```

* **NetworkPolicy** (training-pod egress lockdown) only enforces if your CNI supports it — Calico, Cilium, or kube-router. Flannel alone does **not** enforce.

## Production notes

* Schedule MySQL and storage on reliable nodes; back up the data PVCs.
* Size training compute per job via `RESOURCE_REQUESTS` / `RESOURCE_LIMITS` ([Configuration](https://docs.tracebloc.io/environment-setup/configuration.md#resource-limits-for-training-jobs)).
* Day-2 upgrades and rollbacks: see [Operations](https://docs.tracebloc.io/environment-setup/operations.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.