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

jetstack/terraform-google-gke-cluster: A Terraform module to create a best-pract ...

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

开源软件名称(OpenSource Name):

jetstack/terraform-google-gke-cluster

开源软件地址(OpenSource Url):

https://github.com/jetstack/terraform-google-gke-cluster

开源编程语言(OpenSource Language):

HCL 89.1%

开源软件介绍(OpenSource Introduction):

Terraform Google GKE Cluster

A Terraform module to create a best-practice Google Kubernetes Engine (GKE) cluster.

This module is available on Terraform registry.

The module is designed to be used by Jetstack customers to make it easier for them to create clusters that are secure and follow Jetstack recommendations. It gives them flexibility with certain properties so the cluster can be customised to their needs, but gives fixed values for properties that could lead to issues or insecurity.

Deprecation

⚠️ The 0.3 release of this module is planned to be the final release. ⚠️

After this the module will be deprecated in favour of Google's GKE module. Jetstack will be producing an example project using Google's module as well as migration guidance.

Requirements

The module requires an existing Google Cloud project, with VPC network and subnetwork for the cluster to use. The subnetwork must be in the same region as the cluster and have pod and service ranges specified.

Customisable Properties

The module allows the cluster to be extensively customised using input variables. These can be found with documentation in variables.tf.

The customisable properties include:

  • Release channel or minimum master version
  • Private nodes
  • Master private endpoint
  • Master authorised network CIDR blocks
  • Master CIDR block
  • Node service account container registry access
  • Google security group for RBAC
  • Workload identity namespace
  • Enable Stackdriver logging and monitoring
  • Enable Google Cloud HTTP load balancing
  • Enable pod security policy controller
  • Daily maintenance window start time
  • Node pools
    • Name
    • Inital node count
    • Minimum and maximum number of nodes for autoscaling
    • Enable automatic repair and upgrade
    • Machine type
    • Disk size and type
    • Use preemptible nodes
    • Kubernetes version

Fixed Arguments

Some of the properties of the cluster are fixed based on Jetstack's recommended best-practice settings:

  • Enabling network policy for nodes and master using Calico.
  • Disabling basic authentication and client certificate issuing.
  • Disabling Kubernetes dashboard (Google Cloud Console should be used instead).
  • Use of VPC native networking (using a specified network and subnetwork).
  • Removing the default node pool and creating one or more new pools with Terraform for easier management.
  • Setting the OAuth scope of nodes to cloud-platform to manage permissions with IAM.
  • Disabling node legacy endpoints.
  • Creating an IAM service account for nodes with the minimum required roles:
    • Logging log writer
    • Monitoring metric writer
    • Monitoring viewer

Usage

The module itself is located in the root of this repo, and is designed to be used as part of a larger Terraform project. It can be used directly from the Terraform Registry like so:

module "gke-cluster" {
  source  = "jetstack/gke-cluster/google"
  version = "0.3.0"

  # insert the 9 required variables here
}

Example

There is an example project in the example/ directory which can be used to test and demonstrate the module. It could also be used as the basis for your own Terraform project.

Limitations

If private nodes are used then nodes will not have direct access to the internet. This means they cannot pull images hosted outside of the container registry in the same project as the cluster. The example project features a Cloud NAT to give the nodes to access the internet.

License

This project is licensed under the Apache 2.0 License. For full details see the LICENSE file.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
googlemaps/v3-utility-library: Utility libraries for Google Maps JavaScript API ...发布时间:2022-06-12
下一篇:
webdevmatics/GoogleCalendarApi发布时间:2022-06-12
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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