• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

scholzj/terraform-aws-kubernetes: Terraform module for Kubernetes setup on AWS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

scholzj/terraform-aws-kubernetes

开源软件地址(OpenSource Url):

https://github.com/scholzj/terraform-aws-kubernetes

开源编程语言(OpenSource Language):

HCL 51.1%

开源软件介绍(OpenSource Introduction):

AWS Kubernetes

AWS Kubernetes is a Kubernetes cluster deployed using Kubeadm tool. It provides full integration with AWS. It is able to handle ELB load balancers, EBS disks, Route53 domains etc.

Updates

  • 27.6.2022 Update to Kubernetes 1.24.2
  • 11.6.2022 Update to Kubernetes 1.24.1 + update addons + remove dependency on the template provider
  • 8.5.2022 Update to Kubernetes 1.24.0 + update add-ons
  • 23.3.2022 Update to Kubernetes 1.23.5 + update addons
  • 19.2.2022 Update to Kubernetes 1.23.4
  • 12.2.2022 Update to Kubernetes 1.23.2
  • 29.12.2021 Update to Kubernetes 1.23.1
  • 11.12.2021 Update to Kubernetes 1.23.0

Prerequisites and dependencies

  • AWS Kubernetes deployes into existing VPC / public subnet. If you don't have your VPC / subnet yet, you can use this module to create one.
    • The VPC / subnet should be properly linked with Internet Gateway (IGW) and should have DNS and DHCP enabled.
    • Hosted DNS zone configured in Route53 (in case the zone is private you have to use IP address to copy kubeconfig and access the cluster).
  • To deploy AWS Kubernetes there are no other dependencies apart from Terraform. Kubeadm is used only on the EC2 hosts and doesn't have to be installed locally.

Including the module

Although it can be run on its own, the main value is that it can be included into another Terraform configuration.

module "kubernetes" {
  source = "scholzj/kubernetes/aws"

  aws_region    = "eu-central-1"
  cluster_name  = "aws-kubernetes"
  master_instance_type = "t2.medium"
  worker_instance_type = "t2.medium"
  ssh_public_key = "~/.ssh/id_rsa.pub"
  ssh_access_cidr = ["0.0.0.0/0"]
  api_access_cidr = ["0.0.0.0/0"]
  min_worker_count = 3
  max_worker_count = 6
  hosted_zone = "my-domain.com"
  hosted_zone_private = false

  master_subnet_id = "subnet-8a3517f8"
  worker_subnet_ids = [		
      "subnet-8a3517f8",
      "subnet-9b7853f7",
      "subnet-8g9sdfv8"
  ]
  
  # Tags
  tags = {
    Application = "AWS-Kubernetes"
  }

  # Tags in a different format for Auto Scaling Group
  tags2 = [
    {
      key                 = "Application"
      value               = "AWS-Kubernetes"
      propagate_at_launch = true
    }
  ]
  
  addons = [
    "https://raw.githubusercontent.com/scholzj/terraform-aws-kubernetes/master/addons/storage-class.yaml",
    "https://raw.githubusercontent.com/scholzj/terraform-aws-kubernetes/master/addons/heapster.yaml",
    "https://raw.githubusercontent.com/scholzj/terraform-aws-kubernetes/master/addons/dashboard.yaml",
    "https://raw.githubusercontent.com/scholzj/terraform-aws-kubernetes/master/addons/external-dns.yaml",
    "https://raw.githubusercontent.com/scholzj/terraform-aws-kubernetes/master/addons/autoscaler.yaml"
  ]
}

An example of how to include this can be found in the examples dir.

Addons

Currently, following addons are supported:

  • Kubernetes dashboard
  • Heapster for resource monitoring
  • Storage class and CSI driver for automatic provisioning of persistent volumes
  • External DNS (Replaces Route53 mapper)
  • Ingress
  • Autoscaler

The addons will be installed automatically based on the Terraform variables.

Custom addons

Custom addons can be added if needed. For every URL in the addons list, the initialization scripts will automatically call kubectl -f apply <Addon URL> to deploy it. The cluster is using RBAC. So the custom addons have to be RBAC ready.

Tagging

If you need to tag resources created by your Kubernetes cluster (EBS volumes, ELB load balancers etc.) check this AWS Lambda function which can do the tagging.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap