Connect existing GKE cluster

Truefoundry can help connect an existing AWS cluster to the control-plane. To do this, you can install the tfy-k8s-gcp-gke-standard-inframold helm chart to the cluster to install all the components.

This chart will install all the components needed for Truefoundry compute-plane. You can find the default values of this chart here.

Installing OCLI

  1. Download the binary using the below command.
    curl -H 'Cache-Control: max-age=0' -s "$(curl -H 'Cache-Control: max-age=0' -s" -o ocli
    curl -H 'Cache-Control: max-age=0' -s "$(curl -H 'Cache-Control: max-age=0' -s" -o ocli
    curl -H 'Cache-Control: max-age=0' -s "$(curl -H 'Cache-Control: max-age=0' -s" -o ocli
    curl -H 'Cache-Control: max-age=0' -s "$(curl -H 'Cache-Control: max-age=0' -s" -o ocli
  2. Make the binary executable and move it to $PATH
    sudo chmod +x ./ocli
    sudo mv ocli /usr/local/bin
  3. Confirm by running the command
    ocli --version

Download the kubeconfig file

gcloud container clusters get-credentials CLUSTER_NAME  --zone ZONE  --project PROJECT

Connecting the existing cluster to TrueFoundry portal

  • Head over to the TrueFoundry platform and log in. If you haven't logged in, then you can sign up here.

  • Once you have logged in, navigate to Settings tag from the left panel and create the new API key. Copy the API key as it will be used in the next set of commands.

  • Create an integrations file to setup the cluster on TrueFoundry. Let's name the file tfy-integrations.yaml

    name: CLUSTER_NAME
        clusterType: gcp-gke-standard
  • Run the following command which will generate a token which is to be passed to the values.yaml below
ocli compute-plane-connect -f tfy-integrations.yaml --api-key API_KEY --control-plane-url CONTROL_PLANE_URL
  • Now you will see a cluster is created on the platform. We will continue ahead in the deployment section to install the agent so that the GKE cluster can connect to the platform.

  • Prepare the following values.yaml file. Paste the tenant , controlPlaneURL, clusterName and the token generated from the previous command.

    ## @section Global Parameters
    ## @param tenantName Parameters for tenantName
    ## Tenant Name - This is same as the name of the organization used to sign up 
    ## on Truefoundry
    tenantName: "TENANT"
    ## @param controlPlaneURL Parameters for controlPlaneURL
    ## URL of the control plane - Same as the URL of the Truefoundry dashboard
    controlPlaneURL: "CONTROL_PLANE_URL"
    ## @param clusterName Name of the cluster
    ## Name of the cluster that you have created on AWS/GCP/Azure
    clusterName: "CLUSTER_NAME"
    ## @section Parameters for tfyAgent
    ## @param tfyAgent.enabled Flag to enable Tfy Agent
      enabled: true
      ## @param tfyAgent.clusterToken Parameters for clusterToken
      ## Token for cluster authentication
      clusterToken: "CLUSTER_TOKEN"
  • Run the ocli or the helm command to install the cluster

    • ocli
      ocli compute-plane-install -f values.yaml --cluster-type gcp-gke-standard
    • helm
      helm repo add truefoundry
      helm repo update truefoundry
      helm install my-tfy-k8s-aws-eks-inframold truefoundry/tfy-k8s-gcp-gke-standard-inframold -f values.yaml