Google Kubernetes Engine (GKE)ΒΆ

The following example will be used to illustrate configuration schema.

k8s:
  the-first-cluster:
    type: gcp-provision-gke
    region: us-central1
    zones:
      - "us-central1-a"
    vpc:
      name: the-first-vpc
      subnet: frontend
      ip_range_pods: pods
      ip_range_services: services
    firewal_exeption_ip_ranges:
      - "0.0.0.0/0"
    min_count: 1
    max_count: 5
    initial_node_count: 2
    namespace: "teamenv4k8s"
    mashine_type: "n1-standard-2"
    disk_size_gb: 10
    disk_type: "pd-standard"
    image_type: "COS"
    auto_repair: true
    auto_upgrade: true
    preemptible: false
    kubernetes_version: "1.12.7-gke.10"
    service_account: "terraform@the-project.iam.gserviceaccount.com"
    logging_service: none
    monitoring_service: none
    kubernetes_dashboard: false

  the-second-cluster:
    type: gcp-provision-gke
    region: us-central1
    zones:
      - "us-central1-a"
    vpc:
      name: the-second-vpc
      subnet: frontend2
      ip_range_pods: pods
      ip_range_services: services
    firewal_exeption_ip_ranges:
      - "0.0.0.0/0"
    min_count: 1
    max_count: 5
    initial_node_count: 2
    namespace: "teamenv4k8s"
    mashine_type: "n1-standard-2"
    disk_size_gb: 10
    disk_type: "pd-standard"
    image_type: "COS"
    auto_repair: true
    auto_upgrade: true
    preemptible: false
    kubernetes_version: "1.12.7-gke.10"
    service_account: "terraform@the-project.iam.gserviceaccount.com"
    logging_service: none
    monitoring_service: none
    kubernetes_dashboard: false

GKE clusters are defined using YAML syntax as described in the table below

Element

Description

k8s

Parent element of Kubernetes (GKE) definitions, contains list clusters to be created.

the-first-cluster,the-second-cluster

Kubernetes (GKE) identifier. Groups Kubernetes (GKE) settings. OpeNgine will assign this name to Kubernetes (GKE), also used as reference in other configuration sections.

type

For GCP Kubernetes (GKE), type accepts one value: gcp-provision-gke - the Kubernetes (GKE) will be provisioned and configured by OpeNgine.

region

GCP region where GKE cluster will be placed in.

zones

The list of GCP availability zones hosting GKE cluster.

vpc

Parent element grouping references to VPC and VPC elements.

vpc.name

Reference to VPC that will be assigned to cluster.

vpc.subnet

Reference to subnet that will be assigned to cluster.

vpc.ip_range_pods

Reference to secondary IP range - for Kubernetes pods.

vpc.ip_range_services

Reference to secondary IP range - for Kubernetes services.

firewal_exeption_ip_ranges

The list of IP ranges that will be granted access to the cluster by creation of Firewall rules.

min_count,max_count

Define range for number of nodes in the cluster (for autoscaling).

initial_node_count

Defines initial number of nodes in the cluster (for autoscaling).

namespace

Namespace identifier, OpeNgine will create kubernetes namespace with that and will use it for application deployment.

mashine_type

VM machine type and size for Kubernetes nodes.

disk_size_gb

VM disk size for Kubernetes nodes.

disk_type

VM disk type for Kubernetes nodes.

image_type

VM OS image identifier for Kubernetes nodes.

auto_repair

VM machine automatic repair flag for Kubernetes nodes.

auto_upgrade

VM machine automatic upgrade flag for Kubernetes nodes.

preemptible

To indicate that Kubernetes nodes should use preemtible VMs.

count

Number of worker nodes in AKS cluster.

kubernetes_version

GKE version - Supported versions.

service_account

The service account to be used by the Node VMs.

logging_service

The logging service that the cluster should write logs to.

monitoring_service

The monitoring service that the cluster should write metrics to.

kubernetes_dashboard

Enables deployment of Kubernetes dashboard.

References: