Skip to content

massdriver-cloud/gcp-gke-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Massdriver

gcp-gke-cluster

Release Contributors Forks Stargazers Issues MIT License

GKE is a managed Kubernetes service in GCP that implements the full Kubernetes API, 4-way autoscaling, release channels and multi-cluster support.


Design

For detailed information, check out our Operator Guide for this bundle.

Usage

Our bundles aren't intended to be used locally, outside of testing. Instead, our bundles are designed to be configured, connected, deployed and monitored in the Massdriver platform.

What are Bundles?

Bundles are the basic building blocks of infrastructure, applications, and architectures in Massdriver. Read more here.

Bundle

Params

Form input parameters for configuring a bundle for deployment.

View

Properties

  • cluster_networking (object): Configure the network configuration of the cluster.
    • cluster_ipv4_cidr_block (string): CIDR block to use for kubernetes pods. Set to /netmask (e.g. /16) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Default: /16.

    • master_ipv4_cidr_block (string): CIDR block to use for kubernetes control plane. The mask for this must be exactly /28. Must be from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), and should not conflict with other ranges in use. It is recommended to use consecutive /28 blocks from the 172.16.0.0/16 range for all your GKE clusters (172.16.0.0/28 for the first cluster, 172.16.0.16/28 for the second, etc.). Default: 172.16.0.0/28.

      Examples:

      "10.100.0.0/16"
      "192.24.12.0/22"
    • services_ipv4_cidr_block (string): CIDR block to use for kubernetes services. Set to /netmask (e.g. /20) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. Default: /20.

  • core_services (object): Configure core services in Kubernetes for Massdriver to manage.
    • cloud_dns_managed_zones (array): Select any Cloud DNS Managed Zones associated with this cluster to allow the cluster to automatically manage DNS records and SSL certificates. Default: [].
      • Items (string)
    • enable_ingress (boolean): Enabling this will create an nginx ingress controller in the cluster, allowing internet traffic to flow into web accessible services within the cluster. Default: False.
  • node_groups (array): Node groups to provision.
    • Items (object): Definition of a node group.
      • is_spot (boolean): Spot instances are more affordable, but can be preempted at any time. Default: False.
      • machine_type (string): Machine type to use in the node group. Default: e2-standard-2.
        • One of
          • Shared-core: 2 vCPUs 2GB Memory
          • Shared-core: 2 vCPUs 4GB Memory
          • General: 2 vCPUs 8GB Memory
          • General: 4 vCPUs 16GB Memory
          • General: 8 vCPUs 32GB Memory
          • General: 16 vCPUs 64GB Memory
          • General: 32 vCPUs 64GB Memory
          • Memory: 2 vCPUs 16GB Memory
          • Memory: 4 vCPUs 32GB Memory
          • Memory: 8 vCPUs 64GB Memory
          • Memory: 16 vCPUs 128GB Memory
          • CPU: 2 vCPUs 2GB Memory
          • CPU: 4 vCPUs 4GB Memory
          • CPU: 8 vCPUs 8GB Memory
          • CPU: 16 vCPUs 16GB Memory
          • CPU: 32 vCPUs 32GB Memory
          • GPU: 1 GPU 40GB Memory - NVIDIA A100 40GB
          • GPU: 16 GPUs 640GB Memory - NVIDIA A100 40GB
          • GPU: 1 GPU 80GB Memory - NVIDIA A100 80GB
          • GPU: 1 GPU 24GB Memory - NVIDIA L4
          • GPU: 2 GPU 48GB Memory - NVIDIA L4
      • max_size (number): Maximum number of instances in the node group. Default: 10.
      • min_size (number): Minimum number of instances in the node group. Default: 1.
      • name (string): The name of the node group.

Examples

{
    "__name": "Development",
    "node_groups": [
        {
            "machine_type": "e2-standard-2",
            "max_size": 5,
            "min_size": 1,
            "name": "small-pool"
        }
    ]
}
{
    "__name": "Production",
    "node_groups": [
        {
            "machine_type": "e2-standard-16",
            "max_size": 20,
            "min_size": 1,
            "name": "big-pool-general"
        }
    ]
}
{
    "__name": "Wizard",
    "cluster_networking": {
        "cluster_ipv4_cidr_block": "/16",
        "master_ipv4_cidr_block": "172.16.0.0/28",
        "services_ipv4_cidr_block": "/20"
    },
    "core_services": {
        "enable_ingress": true
    },
    "node_groups": [
        {
            "is_spot": false,
            "machine_type": "e2-small",
            "max_size": 5,
            "min_size": 1,
            "name": "wizard"
        }
    ]
}

Connections

Connections from other bundles that this bundle depends on.

View

Properties

  • gcp_authentication (object): GCP Service Account. Cannot contain additional properties.

    • data (object)
      • auth_provider_x509_cert_url (string): Auth Provider x509 Certificate URL. Default: https://www.googleapis.com/oauth2/v1/certs.

        Examples:

        "https://example.com/some/path"
        "https://massdriver.cloud"
      • auth_uri (string): Auth URI. Default: https://accounts.google.com/o/oauth2/auth.

        Examples:

        "https://example.com/some/path"
        "https://massdriver.cloud"
      • client_email (string): Service Account Email.

        Examples:

      • client_id (string): .

      • client_x509_cert_url (string): Client x509 Certificate URL.

        Examples:

        "https://example.com/some/path"
        "https://massdriver.cloud"
      • private_key (string): .

      • private_key_id (string): .

      • project_id (string): .

      • token_uri (string): Token URI. Default: https://oauth2.googleapis.com/token.

        Examples:

        "https://example.com/some/path"
        "https://massdriver.cloud"
      • type (string): . Default: service_account.

    • specs (object)
      • gcp (object): .
        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"
  • subnetwork (object): A region-bound network for deploying GCP resources. Cannot contain additional properties.

    • data (object)

      • infrastructure (object)
        • cidr (string)

          Examples:

          "10.100.0.0/16"
          "192.24.12.0/22"
        • gcp_global_network_grn (string): GCP Resource Name (GRN).

          Examples:

          "projects/my-project/global/networks/my-global-network"
          "projects/my-project/regions/us-west2/subnetworks/my-subnetwork"
          "projects/my-project/topics/my-pubsub-topic"
          "projects/my-project/subscriptions/my-pubsub-subscription"
          "projects/my-project/locations/us-west2/instances/my-redis-instance"
          "projects/my-project/locations/us-west2/clusters/my-gke-cluster"
        • grn (string): GCP Resource Name (GRN).

          Examples:

          "projects/my-project/global/networks/my-global-network"
          "projects/my-project/regions/us-west2/subnetworks/my-subnetwork"
          "projects/my-project/topics/my-pubsub-topic"
          "projects/my-project/subscriptions/my-pubsub-subscription"
          "projects/my-project/locations/us-west2/instances/my-redis-instance"
          "projects/my-project/locations/us-west2/clusters/my-gke-cluster"
        • vpc_access_connector (string): GCP Resource Name (GRN).

          Examples:

          "projects/my-project/global/networks/my-global-network"
          "projects/my-project/regions/us-west2/subnetworks/my-subnetwork"
          "projects/my-project/topics/my-pubsub-topic"
          "projects/my-project/subscriptions/my-pubsub-subscription"
          "projects/my-project/locations/us-west2/instances/my-redis-instance"
          "projects/my-project/locations/us-west2/clusters/my-gke-cluster"
    • specs (object)

      • gcp (object): .
        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"

Artifacts

Resources created by this bundle that can be connected to other bundles.

View

Properties

  • kubernetes_cluster (object): Kubernetes cluster authentication and cloud-specific configuration. Cannot contain additional properties.
    • data (object)

      • authentication (object)
        • cluster (object)
          • certificate-authority-data (string)
          • server (string)
        • user (object)
          • token (string)
      • infrastructure (object): Cloud specific Kubernetes configuration data.
        • One of
          • AWS EKS infrastructure configobject: . Cannot contain additional properties.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • oidc_issuer_url (string): An HTTPS endpoint URL.

              Examples:

              "https://example.com/some/path"
              "https://massdriver.cloud"
          • Infrastructure Configobject: Azure AKS Infrastructure Configuration. Cannot contain additional properties.

            • ari (string): Azure Resource ID.

              Examples:

              "/subscriptions/12345678-1234-1234-abcd-1234567890ab/resourceGroups/resource-group-name/providers/Microsoft.Network/virtualNetworks/network-name"
            • oidc_issuer_url (string)

          • GCP Infrastructure GRNobject: Minimal GCP Infrastructure Config. Cannot contain additional properties.

            • grn (string): GCP Resource Name (GRN).

              Examples:

              "projects/my-project/global/networks/my-global-network"
              "projects/my-project/regions/us-west2/subnetworks/my-subnetwork"
              "projects/my-project/topics/my-pubsub-topic"
              "projects/my-project/subscriptions/my-pubsub-subscription"
              "projects/my-project/locations/us-west2/instances/my-redis-instance"
              "projects/my-project/locations/us-west2/clusters/my-gke-cluster"
    • specs (object)

      • aws (object): .

        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"
      • azure (object): .

        • region (string): Select the Azure region you'd like to provision your resources in.
      • gcp (object): .

        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"
      • kubernetes (object): Kubernetes distribution and version specifications.

        • cloud (string): Must be one of: ['aws', 'gcp', 'azure'].
        • distribution (string): Must be one of: ['eks', 'gke', 'aks'].
        • platform_version (string)
        • version (string)

Contributing

Bug Reports & Feature Requests

Did we miss something? Please submit an issue to report any bugs or request additional features.

Developing

Note: Massdriver bundles are intended to be tightly use-case scoped, intention-based, reusable pieces of IaC for use in the Massdriver platform. For this reason, major feature additions that broaden the scope of an existing bundle are likely to be rejected by the community.

Still want to get involved? First check out our contribution guidelines.

Fix or Fork

If your use-case isn't covered by this bundle, you can still get involved! Massdriver is designed to be an extensible platform. Fork this bundle, or create your own bundle from scratch!

Connect

Questions? Concerns? Adulations? We'd love to hear from you!

Please connect with us!

Email GitHub LinkedIn Twitter YouTube Reddit