Terraform module which creates a DigitalOcean Kubernetes cluster using prescrive defaults.
This module is inspired by terraform-aws-eks
- EKS Cluster
- Specified Private VPC
- Exported URNs for DigitalOcean Projects
- Generated and Export for Kubeconfig file
module "k8s" {
source = "terraform-digitalocean-kubernetes"
version = "0.0.12"
cluster_name_prefix = "test"
cluster_region = "nyc1"
cluster_version_prefix = "1.28."
default_node_pool_node_count = 1
default_node_pool_node_size = "s-2vcpu-2gb"
cluster_ipv4_cidr = "10.1.0.0/20"
# writes the kubeconfig to the local filesystem
path_to_kubeconfig = "/full/path/to/.kube"
use_cluster_name_in_config = true
cluster_addons = {
/*
* Add ArgoCD into its own namespace
*/
argo = {
enabled = true
config = {
subdomain_create = true
}
}
/*
* Add ingress-nginx and cert-manager into their own namespaces
*/
ingress = {
enabled = true
config = {
domain_root = "example.com"
domain_certificate_email = "[email protected]"
}
}
}
# required provider configuration
providers = {
digitalocean = digitalocean
}
}