Skip to content

An example to deploy managed K8s with CDK for Terraform

License

Notifications You must be signed in to change notification settings

ionos-cloud/cdktf-go-k8s-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDK for Terraform Go Example

Test & Build Taylor Swift Volkswagen

Cloud Development Kit for Terraform (CDKTF) allows you to use familiar programming languages to define and provision infrastructure. This is a simple example of how to use CDKTF to create a Kubernetes cluster on the IONOS Cloud using the Go programming language.

⚠️ What is deployed is a Managed Kubernetes Cluster on the IONOS Cloud ☁️. Please be aware that this is not for free.

Prerequisites

Optional:

Deploy

You either have to set the IONOS_USERNAME and IONOS_PASSWORD or IONOS_TOKEN environment variables.

ionosctl token create and ionosctl token get --token-id gives you a token.

Furtheremore, you have to set ACCESS_KEY, SECRET_KEY and BUCKET_NAME environment variables for the Terraform backend.

This can be used in combination with a GitHub Action to deploy the cluster.

The bucket should have versioning enabled.

cdktf deploy

Tests

Writing tests for CDKTF is easy with Go.

go test ./...

If you are finished experimenting you can do a simple cdktf destroy to clean up.

License

MIT

About

An example to deploy managed K8s with CDK for Terraform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages