This module creates a Linode Kubernetes (LKE) Cluster on the Akamai Connected Cloud using Terraform.
The readme.md has the following sections:
- Requirements - Min requirements for the module to run
- Providers - Providers required by the module
- Inputs- Inputs to the module
- Outputs - Outputs from the module
- Usage - How to use the module
The following requirements are needed by this module:
-
terraform (>= 1.5.7)
-
helm (>= 2.11.0)
-
kubernetes (>= 2.23.0)
-
linode (>= 2.9.3)
The following providers are used by this module:
- linode (2.10.1)
The following input variables are required:
Description: n/a
Type:
object({
api_token = string
})
Description: The ID of the LKE cluster
Type: string
The following input variables are optional (have default values):
Description: values for the nodebalancer
Type:
object({
client_conn_throttle = string
})
Default:
{
"client_conn_throttle": "20"
}
The following outputs are exported:
Description: The ID of the firewall created for the LKE cluster.
Description: The link to the firewall created for the LKE cluster.
Description: The NodeBalancer created for the LKE cluster.
Sample usage of this module is as shown below. For detailed info, look at inputs and outputs.
In your main.tf, add the following code:
# Create the Networking stack
module "lke" {
source = "./modules/lke-networking"
providers = {
linode.default = linode
}
linode_config = var.linode_config # Pass the Linode configuration to the module
lke_cluster = var.lke_cluster # Pass the LKE cluster configuration to the module
}
output "lke-networking" {
description = "Important outputs from LKE Networking."
value = module.lke-networking # Output from the lke module
}
- lke is the name of the module. You can use any name you want.
In your provider.tf, add the following code, if it doesn't exist already:
terraform {
required_version = ">= 1.5.7"
required_providers {
linode = {
source = "linode/linode"
version = ">= 2.9.3"
configuration_aliases = [ linode.default ]
}
}
}
provider "linode" {
alias = "default"
token = var.linode_config.api_token
}
Verify your settings using the following command:
terraform init
terraform plan
Apply the changes
terraform apply