This function creates a kubernetes cluster on the current project and zone via gcloud container clusters create. Note that the defaults values for the parameters override the defaults of the shell command.

kub_create_cluster(name, machine_type = "g1-small", num_nodes = 3L,
  disk_size = "20GB", flags = list())

Arguments

name

Name of the cluster

machine_type

Type of the machine (f1-micro, g1-small, n1-standard-1, etc.)

num_nodes

Number of nodes on cluster (must be an integer)

disk_size

Startup disk size (defaults to 20GB)

flags

List with more flags to use and their corresponding values

Value

The name of the cluster

References

https://cloud.google.com/sdk/gcloud/reference/container/clusters/create

Examples

if (FALSE) { create_cluster("r-cluster", disk_size = "100GB", flags = list("tags" = "k8s", "enable-autoupgrade" = "", "disk-type" = "pd-ssd") ) }