GuidesChangelogDiscussions
Log In

Application Management

You can use Ketch's provider for Terraform to provide developers with an easy way to deploy applications across Kubernetes clusters.

Deploying Applications

You can use the example below as a base for deploying applications:

terraform {
  required_providers {
    ketch = {
      version = "0.0.1"
      source = "shipa-corp/ketch"
    }
  }
}

provider "ketch" {}

resource "ketch_app" "tf" {
  app {
    name = "t-a2"
    image = "docker.io/shipasoftware/bulletinboard:1.0"
    framework = ketch_framework.tf.framework[0].name
    cnames = [
      "app1.ketch.io",
      "app2.ketch.io",
      "app3.ketch.io"]
    ports = [8081, 8082]
    units = 5
    processes {
      name = "web"
      cmd = [
        "docker-entrypoint.sh",
        "npm",
        "start"]
    }
    routing_settings {
      weight = 100
    }
  }
}

Specification

Component

Type

Description

name

string

The name of the application.

Required: Yes

image

string

The address of the image to be deployed

Required: Yes

framework

string

The name of the framework that was previously created and should be used by Ketch to deploy the application.

Required: Yes

cnames

string

Additional CNAMEs that should be created and assigned to the application.

Required: No

ports

int

A port, or list of ports, that should be used by Ketch to expose the application once deployed.

Required: No
Default: Ketch will use the port defined in the EXPOSE definition of your container image.

units

int

The number of containers that should be used to deploy the application.

Required: No
Default: 1

processes

processes

Custom commands that should be executed by Ketch.

Required: No

routingSettings

routingSettings

The traffic weight that should be assigned to your application in case this is a follow on deployment.

Required: No

Processes

Component

Type

Description

name

string

The name of the process to be executed by Ketch.

cmds

string

The breakdown of the command to be executed by Ketch.

Router Settings

Component

Type

Description

weight

int

The traffic weight that should be shifted to the new deployment version.