Kubespot (GCP)

May 6, 2026 · View on GitHub

Compliance Oriented Kubernetes Setup for Google Cloud.

Tools & Setup

brew install kubectl kubernetes-helm google-cloud-sdk terraform

Terraform usage

gcloud auth activate-service-account --key-file=./account.json
terraform init && terraform get -update && terraform apply


gcloud config set account foo@opszero.com # Set account name
gcloud container clusters get-credentials <clustername> --region us-central1

Providers

NameVersion
googlen/a
helmn/a
httpn/a
nulln/a
randomn/a

Inputs

NameDescriptionTypeDefaultRequired
auto_repairEnables or disables automatic repair of nodes in the cluster.booltrueno
auto_upgradeEnables or disables automatic upgrades of nodes in the cluster.booltrueno
cluster_create_timeoutsTimeout for creating the cluster.string"30m"no
cluster_delete_timeoutsTimeout for deleting the cluster.string"30m"no
cluster_update_timeoutsTimeout for updating the cluster.string"30m"no
cluster_versionThe minimum version of the masterstring"1.27"no
csi_secrets_store_enabledSpecify whether the CSI driver is enabledboolfalseno
disk_size_gbSize of the disk in gigabytes for each node in the cluster.number10no
disk_typeType of disk to use for the nodes in the cluster.string""no
environment_nameName of the resource. Provided by the client when the resource is created.string""no
image_typeType of image to use for the nodes in the cluster.string""no
initial_node_countThe number of nodes to create in this cluster's default node pool.number0no
kms_enabledSpecify whether the redis cluster is enabledboolfalseno
kubectl_config_pathPath to the kubectl config file. Defaults to $HOME/.kube/configstring""no
locationThe location (region or zone) in which the cluster master will be created, as well as the default node location.string""no
location_policySpecifies the policy for distributing nodes across locations, with the default being BALANCEDstring"BALANCED"no
machine_typeSpecifies the machine type for the nodes in the cluster.string""no
max_node_countMaximum number of nodes in the cluster.number1no
min_master_versionThe minimum version of the master.string""no
min_node_countMinimum number of nodes in the cluster.number1no
preemptibleSpecifies whether the nodes in the cluster should be preemptible.boolfalseno
projectThe Google project that will host the clusterstringn/ayes
redis_enabledSpecify whether the redis cluster is enabledboolfalseno
redis_ha_enabledSpecify whether HA is enabled for redisboolfalseno
redis_memory_in_gbRedis memory size in GiBnumber1no
regionThe location (region or zone) in which the cluster master will be createdstring""no
remove_default_node_pooldeletes the default node pool upon cluster creation.booltrueno
service_accountThe Google Cloud Platform Service Account to be used by the node VMs created by GKE Autopilot or NAP.string""no
sql_enabledSpecify whether the sql instance is enabledboolfalseno
sql_engineThe sql version to usestring"POSTGRES_15"no
sql_instance_classThe machine type to usestring"db-f1-micro"no
sql_master_passwordThe password for the db userstring""no
sql_master_usernameThe name of the db userstring""no
tagsTerraform map to create custom tags for the Google resourcesmap{}no

Resources

NameType
google_compute_global_address.private_ip_addressresource
google_compute_network.networkresource
google_compute_router.nat_routerresource
google_compute_router_nat.nat_configresource
google_compute_subnetwork.subnetresource
google_container_cluster.primaryresource
google_container_node_pool.node_poolresource
google_kms_crypto_key.keyresource
google_kms_key_ring.keyringresource
google_redis_instance.cacheresource
google_service_networking_connection.private_vpc_connectionresource
google_sql_database_instance.defaultresource
google_sql_user.userresource
helm_release.csi_secrets_storeresource
null_resource.configure_kubectlresource
null_resource.csi_secrets_store_aws_providerresource
null_resource.sql_vpc_lockresource
random_id.serverresource
google_client_config.defaultdata source
http_http.csi_secrets_store_gcp_providerdata source

Outputs

NameDescription
private_vpc_networkn/a
sql_databasen/a

🚀 Built by opsZero!

opsZero provides software and consulting for DevOps. With our decade plus of experience scaling some of the world’s most innovative companies we have developed deep expertise in Kubernetes, DevOps, FinOps, and Compliance.

Our software and consulting solutions enable organizations to:

  • migrate workloads to the Cloud
  • setup compliance frameworks including SOC2, HIPAA, PCI-DSS, ITAR, FedRamp, CMMC, and more.
  • FinOps solutions to reduce the cost of running Cloud workloads
  • Kubernetes optimized for web scale and AI workloads
  • finding underutilized Cloud resources
  • setting up custom AI training and delivery
  • building data integrations and scrapers
  • modernizing onto modern ARM based processors

We do this with a high-touch support model where you:

  • Get access to us on Slack, Microsoft Teams or Email
  • Get 24/7 coverage of your infrastructure
  • Get an accelerated migration to Kubernetes

Please schedule a call if you need support.



AWS Advanced Tier AWS DevOps Competency AWS EKS Delivery AWS Public Sector