Local Runners

Use terraform to manage runners in kubiya

A local runner , or simply or runner , is an operator that installed on your Kubernetes cluster and enables you to manage your cluster using Kubiya.

The runner's name should be as descriptive as possible. Usually, the runner name contains the environment name of the cluster it is installed on.

The second parameter is the runner_deployment_folder and is the full path of the destination folder in which the Kubiya Provider will save a Kubernetes manifest. This manifest contains several Kubernetes objects including the kubiya-operator deployment and several other objects. This manifest should be applied in the context of the desired cluster.

terraform {
  required_providers {
    kubiya = {
      source  = "kubiya-terraform/kubiya"
    }
  }
}

provider "kubiya" {
  //Your Kubiya API Key will be taken from the 
  //environment variable KUBIYA_API_KEY
  //To set the key, please use export KUBIYA_API_KEY="YOUR_API_KEY"
}

resource "kubiya_runner" "runner-dev-cluster" {
  name                     = "runner-dev"
  runner_deployment_folder = "$HOME/kubiya_runners/"
}

output "runner-dev-cluster" {
  value = kubiya_runner.runner-dev-cluster
}

Last updated