当前位置: 首页 > 软件库 > 云计算 > 云原生 >

terraform-google-gke-cluster

授权协议 Apache-2.0 License
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 卢枫涟
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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.

 相关资料
  • 重要提示:Terraform 所在的 HashiCorp 公司宣布,不允许中国境内使用该公司旗下的企业版的产品和软件(开源版本不受影响)。 Terraform 是一个安全和高效的用来构建、更改和合并基础架构的工具。采用 Go 语言开发。Terraform 可管理已有的流行的服务,并提供自定义解决方案。 Terraform 的关键特性: 架构就是代码 执行计划 资源图 变更自动化

  • 自动化部署使用 Terraform 在 Digital Ocean 上创建服务器,然后 Ansible 在这些服务器上创建和管理测试网络。 安装 注意:请参阅集成 bash 脚本,它可以在一个新的 DO 液滴上运行,并将自动启动一个 4 节点的测试网络。脚本或多或少完成了下面描述的所有工作。 在 Linux 机器上安装 Terraform 和 Ansible。 创建一个带读写能力的 Digital

  • Terraform是一个开源的互动高度场的产生和处理程序,使您能够生成随机地形和改变它。 Terraform 允许您创建分形地形(也称为高度场)和改造它使用了一些算法。其目的是为那些将要生成谁在光线跟踪或其他模拟使用数字地形模型的工具。 Terraform功能不同的看法和colormaps并预览模式,功能的交互式实时地形对象时旋转。 Terraform运行于GNOME桌面环境。

  • Terraform Landscape Terraform Landscape is a tool for reformatting the output of terraform planto be easier to read and understand. Before After Requirements Installation Usage Requirements Ruby 2.5+

  • mastodon-terraform Boilerplate for running Mastodon on AWS using Terraform and CircleCI. ┌---------------┐| Web Browser |└---------------┘▲ ▲| |(HTTPS) (WSS)|

  • Kubestack The Open Source Gitops Framework Join Our Contributors! Introduction Kubestack is a Gitops framework for managed Kubernetes services based on Terraform and Kustomize. Features Provides full