Discover Packages
github.com/kyma-incubator/terraform-provider-gardener
command
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Oct 24, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Overview
The Terraform Provider for Gardener enables Terraform to provision Kubernetes clusters on chosen cloud providers using Gardener . Currently, it supports AWS, Azure, and GCP.
Prerequisites
Terraform 0.10+
Go 1.12 or higher
Gardener project with kubeconfig access and configured cloud provider secrets
Development
Perform the following steps to build the providers:
Build the provider:
go build -o terraform-provider-gardener
Move the gardener provider binary into the terraform plugins folder:
On MacOS:
mv terraform-provider-gardener ~/.terraform.d/plugins/terraform-provider-gardener
For other systems and further details, see this document.
Usage
Perform the following steps to use the provider:
Go to the provider example folder:
cd examples/<provider>
Edit the main.tf file to provide the following parameters:
Path to the Gardener kubeconfig
Shoot specification
NOTE: To obtain the gardener secret and kubeconfig go to the Gardener dashboard .
provider "gardener" {
kube_file = "${file("<my-gardener-service-account-kubeconfig>")}"
}
resource "gardener_shoot" "<Name>" {
metadata {
name = "<name-to-be-shown-in-gardener>"
namespace = "<gardener-profile-namespace>"
}
spec {
cloud {
profile = "az"
region = "westeurope"
seed = "az-eu1"
secret_binding_ref {
name = "<secret_binding>"
}
azure {
networks {
vnet {
cidr = "10.250.0.0/16"
}
workers = "10.250.0.0/19"
}
worker {
name = "cpu-worker"
machine_type = "Standard_D2_v3"
auto_scaler_min = 3
auto_scaler_max = 3
max_surge = 1
max_unavailable = 0
volume_type = "standard"
volume_size = "50Gi"
}
}
}
kubernetes {
version = "1.15.4"
}
}
}
Initialize Terraform:
terraform init
Plan the provisioning:
terraform plan
Deploy the cluster:
terraform apply
Examples
See the examples to learn how to use Gardener to deploy clusters on AWS, GCP, and Azure.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.