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

# Install with Kustomize

> Render the Tensormesh Operator chart with helm template and patch it with Kustomize overlays.

Kustomize does not render Helm charts natively. The standard pattern is to use `helm
template` to produce raw manifests, commit them as a base, and apply per-environment
overlays.

<Note>
  Use this approach when your organization standardizes on Kustomize as the final renderer
  (for example, as the input to Argo CD or your CD pipeline). If you don't have that
  constraint, [Install with Helm](/operator/installation/helm) is simpler.
</Note>

<Note>
  The chart is distributed through a private registry. `helm template` against the OCI URL
  requires you to `helm registry login ghcr.io` first, using a token from the Tensormesh
  team — see [Install with Helm → Install](/operator/installation/helm#install).
</Note>

## Render the chart

```bash theme={null}
helm template tensormesh-operator \
  oci://ghcr.io/tensormesh-production/charts/tensormesh-operator \
  --namespace tensormesh-operator \
  --include-crds \
  > base/manifests.yaml
```

<Tip>
  `--include-crds` is required — Helm omits CRDs from `template` output by default.
</Tip>

## Wire up the base

```yaml base/kustomization.yaml theme={null}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: tensormesh-operator

resources:
  - namespace.yaml
  - manifests.yaml
```

```yaml base/namespace.yaml theme={null}
apiVersion: v1
kind: Namespace
metadata:
  name: tensormesh-operator
```

## Add an overlay

```yaml overlays/prod/kustomization.yaml theme={null}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - ../../base

patches:
  - target:
      kind: Deployment
      name: tensormesh-operator
    patch: |-
      - op: replace
        path: /spec/replicas
        value: 2
  - target:
      kind: LMCacheEngine
      name: tensormesh-operator-default
    patch: |-
      - op: replace
        path: /spec/l1/sizeGB
        value: 120
```

Apply:

```bash theme={null}
kubectl apply -k overlays/prod
```

## Re-rendering when the chart updates

The output of `helm template` is a snapshot. To pick up a new chart version, re-run the
render command above and commit the diff. Kustomize overlays continue to apply on top.

For teams that want this rendered automatically, both Argo CD and Flux can render Helm
then layer Kustomize overlays inline — see [Install with
GitOps](/operator/installation/gitops).

## Trade-offs vs. Helm

|                   | Helm                                 | Helm-template + Kustomize                       |
| ----------------- | ------------------------------------ | ----------------------------------------------- |
| Upgrade UX        | `helm upgrade`                       | Re-render + diff + apply                        |
| Release tracking  | Helm stores history (rollback works) | None; you rely on Git                           |
| Conditional logic | Chart's templating + values          | Patches per overlay                             |
| Best for          | Single-purpose installs              | Pipelines that already use Kustomize end-to-end |

## Next steps

<CardGroup cols={2}>
  <Card title="Helm install reference" icon="ship-wheel" href="/operator/installation/helm">
    Every value the rendered manifests are derived from.
  </Card>

  <Card title="GitOps" icon="code-branch" href="/operator/installation/gitops">
    Argo CD and Flux can do the Helm-template + Kustomize-overlay pipeline for you.
  </Card>
</CardGroup>
