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

# Install Helm Chart

> Guide to install and customize the control-plane helm chart

The control-plane helm chart is available in this Github repository: [truefoundry](https://github.com/truefoundry/infra-charts/tree/main/charts/truefoundry). This guide will walk you through the steps to install the helm chart and then customize it as per your needs.

<Note>
  This guide assumes you already have a Kubernetes cluster and have access to it. If you don't have a Kubernetes cluster, you can follow the [AWS Control Plane](/docs/aws-control-plane), [GCP Control Plane](/docs/gcp-control-plane) or  [Azure Control Plane](/docs/azure-control-plane) to create the cluster first.
</Note>

<Steps>
  <Step title="Create truefoundry namespace">
    Create `truefoundry` namespace

    ```bash lines theme={"dark"}
    kubectl create ns truefoundry
    ```
  </Step>

  <Step title="Install ArgoCD if not already installed (Optional)">
    While you can install the helm chart without ArgoCD, we do recommend to install it via ArgoCD to make it easier to manage in the future.

    ```bash lines theme={"dark"}
      helm repo add argocd https://argoproj.github.io/argo-helm
      helm repo update argocd
    ```

    ```bash lines theme={"dark"}
    helm install argocd argo/argo-cd \
    --namespace argocd \
    --create-namespace \
    --version 9.5.11 \
    --set server.extraArgs[0]="--insecure" \
    --set server.extraArgs[1]="--application-namespaces=*" \
    --set controller.extraArgs[0]="--application-namespaces=*" \
    --set applicationSet.enabled=false \
    --set notifications.enabled=false \
    --set dex.enabled=false
    ```

    If you don't want to install ArgoCD, you can skip this step and proceed to the next step.
  </Step>

  <Step title="Install truefoundry chart">
    <Tabs>
      <Tab title="With ArgoCD">
        Coming soon
      </Tab>

      <Tab title="Without ArgoCD">
        Add truefoundry helm repo

        ```bash lines theme={"dark"}
        helm repo add truefoundry https://truefoundry.github.io/infra-charts/
        helm repo update truefoundry
        ```

        Create a file called `values.yaml` and fill in the content below:

        ```yaml theme={"dark"}
        truefoundry:
           enabled: true
           devMode:
             enabled: false # Set to true if you want to test the control plane in dev mode
           # Virtual service to create
           virtualservice:
             enabled: false
             hosts: ["domain"]
             gateways: ["istio-system/tfy-wildcard"]
           database:
             host: ""
             name: ""
             username: ""
             password: ""
           tfyApiKey: "" # Given by TrueFoundry team
           truefoundryImagePullConfigJSON: "" # Given by truefoundry team
        ```

        Install control-plane helm chart

        ```bash lines theme={"dark"}
        helm install truefoundry truefoundry/truefoundry -n truefoundry -f values.yaml 
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Point the domain to the Load balancer IP of the control plane">
    ```bash lines theme={"dark"}
    kubectl get svc -n istio-system
    ```

    Point the domain to the Load balancer IP of the control plane. Check [here](/docs/add-certificate-for-tls) on how to add a certificate for TLS.
  </Step>

  <Step title="Test the installation">
    ```bash lines theme={"dark"}
    kubectl get pods -n truefoundry
    ```
  </Step>

  <Step title="Access the control plane dashboard">
    Access the control plane dashboard via `https://domain` or if via port-forward if dev mode is enabled

    ```bash lines theme={"dark"}
    kubectl port-forward svc/truefoundry-truefoundry-frontend-app -n truefoundry 5000:5000
    ```
  </Step>
</Steps>
