Skip to content

atrakic/digitalocean-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

digitalocean-k8s

CircleCI

Terraform module that builds a managed k8s cluster on DigitalOcean with Terraform.

Requirements:

Optionals

Usage

$ cd terraform
$ terraform init
$ terraform apply

or with make:

$ cd terraform
$ export DIGITALOCEAN_TOKEN="YOUR_TOKEN"
$ make
$ make apply
$ make output # prints usage instructions with kubectl

or as terraform module:

module "my_do_k8s" {
  source  = "github.com/atrakic/digitalocean-k8s/terraform"

  name       = "do-k8s"
  token      = "${var.token}"

  # optionals
  region     = "ams2"    # https://www.digitalocean.com/docs/platform/availability-matrix/
  node_count = "3"
}

Kubeconfig

After cluster creation, new file would be autogenerated (depending of cluster name), which you would need to use in order to access your cluster nodes:

$ cd terraform
$ terraform output
$ export KUBECONFIG=do-k8s
$ kubectl cluster-info
$ kubectl get nodes

Please refer to kubectl documentation about how to use this file: (https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)

For price and documentation: (https://www.digitalocean.com/products/kubernetes/).

TODO

  • Add support for Block Storage volumes
  • Add support for Load Balancers

License

digitalocean-k8s is licensed under the MIT license.

See LICENSE.md for the full license text.

About

Deploy managed k8s cluster with terraform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published