Standard

  • A separate VPC with Cloud NAT is created for the cluster.
  • Nodes in the cluster do not have public IP addresses.
  • Public IP addresses can be allocated to master and static nodes.
    • In this case, one-to-one NAT is used to translate the public IP address to the node’s IP address (note that CloudNAT is not used in such a case).
  • If the master does not have a public IP, then an additional instance with a public IP (aka bastion host) is required for installation tasks and accessing the cluster.
  • Peering can also be configured between the cluster VPC and other VPCs. resources
apiVersion: deckhouse.io/v1
kind: GCPClusterConfiguration
layout: Standard
standard:
  cloudNATAddresses:                                         # optional, compute address names from this list are used as addresses for Cloud NAT
  - example-address-1
  - example-address-2
subnetworkCIDR: 10.0.0.0/24                                  # required
peeredVPCs:                                                  # optional, list of GCP VPC Networks with which Kubernetes VPC Network will be peered
- default
sshKey: "ssh-rsa <SSH_PUBLIC_KEY>"                           # required
labels:
  kube: example
masterNodeGroup:
  replicas: 1
  zones:                                                     # optional
  - europe-west4-b
  instanceClass:
    machineType: n1-standard-4                               # required
    image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911    # required
    diskSizeGb: 20                                           # optional, local disk is used if not specified
    disableExternalIP: false                                 # optional, by default master has externalIP
    additionalNetworkTags:                                   # optional
    - tag1
    additionalLabels:                                        # optional
      kube-node: master
nodeGroups:
- name: static
  replicas: 1
  zones:                                                     # optional
  - europe-west4-b
  instanceClass:
    machineType: n1-standard-4                               # required
    image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911    # required
    diskSizeGb: 20                                           # optional, local disk is used if not specified
    disableExternalIP: true                                  # optional, by default nodes do not have externalIP
    additionalNetworkTags:                                   # optional
    - tag1
    additionalLabels:                                        # optional
      kube-node: static
provider:
  region: europe-west4                                       # required
  serviceAccountJSON: |                                      # required
    {
      "type": "service_account",
      "project_id": "sandbox",
      "private_key_id": "98sdcj5e8c7asd98j4j3n9csakn",
      "private_key": "-----BEGIN PRIVATE KEY-----",
      "client_id": "342975658279248",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/k8s-test%40sandbox.iam.gserviceaccount.com"
    }

WithoutNAT

  • A dedicated VPC is created for the cluster; all cluster nodes have public IP addresses;
  • Peering can be configured between the cluster VPC and other VPCs;

resources

apiVersion: deckhouse.io/v1
kind: GCPClusterConfiguration
layout: WithoutNAT
subnetworkCIDR: 10.0.0.0/24                                 # required
peeredVPCs:                                                 # optional, list of GCP VPC Networks with which Kubernetes VPC Network will be peered
- default
labels:
  kube: example
masterNodeGroup:
  replicas: 1
  zones:                                                     # optional
  - europe-west4-b
  instanceClass:
    machineType: n1-standard-4                               # required
    image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911    # required
    diskSizeGb: 20                                           # optional, local disk is used if not specified
    additionalNetworkTags:                                   # optional
    - tag1
    additionalLabels:                                        # optional
      kube-node: master
nodeGroups:
- name: static
  replicas: 1
  zones:                                                     # optional
  - europe-west4-b
  instanceClass:
    machineType: n1-standard-4                               # required
    image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911    # required
    diskSizeGb: 20                                           # optional, local disk is used if not specified
    additionalNetworkTags:                                   # optional
    - tag1
    additionalLabels:                                        # optional
      kube-node: static
provider:
  region: europe-west4                                       # required
  serviceAccountJSON: |                                      # required
    {
      "type": "service_account",
      "project_id": "sandbox",
      "private_key_id": "98sdcj5e8c7asd98j4j3n9csakn",
      "private_key": "-----BEGIN PRIVATE KEY-----",
      "client_id": "342975658279248",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/k8s-test%40sandbox.iam.gserviceaccount.com"
    }