Google Cloud Platform: Setup and Quick Start
Google Cloud Platform (GCP) stands out among the three major cloud providers for its deep expertise in data analytics, machine learning, and container orchestration. Google’s internal infrastructure — Borg, Colossus, and Spanner — evolved into GCP services like Google Kubernetes Engine (GKE), BigQuery, and Cloud Spanner. While GCP holds a smaller market share than AWS and Azure (~10% per Synergy Research Group, 2025), it consistently ranks highest in developer satisfaction on Stack Overflow surveys due to its clean APIs, consistent IAM model, and exceptional documentation.
Creating Your GCP Account and First Project
Start at cloud.google.com and sign up with a Google account. Google offers $300 in free credits valid for 90 days, plus an Always Free tier that includes access to BigQuery (up to 1 TB of queries per month), Cloud Run (2 million requests per month), Cloud Functions, and Cloud Storage (5 GB). Install the gcloud CLI — the primary tool for interacting with GCP from the command line:
# Authenticate and set defaults
gcloud auth login
gcloud config set project my-example-project
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-aGCP organizes everything into projects. A project is the fundamental isolation boundary for resources, billing, permissions, and APIs. Each project has a unique ID (globally unique, user-provided), name (human-readable), and number (auto-generated). Best practice is to create separate projects for development, staging, and production environments.
gcloud projects create excellentwiki-app --name="ExcellentWiki App"
gcloud config set project excellentwiki-appGoogle Cloud IAM
GCP’s IAM system is simpler and more consistent than AWS IAM. Every resource — compute instances, storage buckets, Pub/Sub topics — uses the same IAM policy format: Who has Role on Resource. Roles are collections of permissions grouped into three tiers:
- Basic roles (Owner, Editor, Viewer) apply broadly and are best avoided for granular access
- Predefined roles are curated by Google for specific services (roles/storage.objectViewer, roles/bigquery.dataViewer)
- Custom roles allow you to assemble exactly the permissions you need
GCP IAM conditions support attribute-based access control using request attributes (IP address, time of day, resource name) and resource attributes. For example, you can restrict data access to users connecting from a corporate VPN.
gcloud projects add-iam-policy-binding excellentwiki-app \
--member=user:engineer@example.com \
--role=roles/compute.instanceAdminCompute Engine: Virtual Machines
Google Compute Engine offers VMs that run on Google’s global network infrastructure. Instance types include E2 (cost-optimized, shared-core), N2 (general-purpose), N4 (general-purpose, Intel Sapphire Rapids), C3 (compute-optimized, Intel Xeon), and G2 (GPU-accelerated with NVIDIA L4).
Key differentiators:
- Sustained use discounts — automatically applied for instances running more than 25% of a month, up to 30% off
- Committed use discounts — 1 or 3 year commitments for 57-70% off on-demand pricing
- Preemptible VMs — short-lived instances for batch workloads at 60-80% discount (max 24-hour runtime)
gcloud compute instances create web-server \
--zone=us-central1-a \
--machine-type=e2-standard-2 \
--image-family=ubuntu-2204-lts \
--image-project=ubuntu-os-cloud \
--boot-disk-size=50GB \
--tags=http-server,https-server \
--metadata startup-script='#!/bin/bash
apt-get update
apt-get install -y nginx
systemctl enable nginx
systemctl start nginx'Cloud Run: Serverless Containers
Cloud Run is GCP’s fully managed serverless container platform. Unlike AWS Lambda, which requires functions, Cloud Run accepts any container image — you deploy standard Docker containers and Google handles scaling, networking, and availability. This freedom is a major advantage for teams that want serverless economics without rewriting applications to a function-based model.
Cloud Run automatically scales from zero to thousands of instances based on incoming traffic. You pay only for resources used during request processing (billed per 100ms). The minimum scale setting (min-instances) can be set to 1 to eliminate cold starts for latency-sensitive applications.
# Deploy a containerized application
gcloud run deploy excellentwiki-api \
--image gcr.io/excellentwiki-app/api:latest \
--region us-central1 \
--allow-unauthenticated \
--cpu 1 \
--memory 512Mi \
--concurrency 80 \
--max-instances 100 \
--min-instances 1Cloud Run supports traffic splitting for canary deployments — send 10% of traffic to revision v2 while 90% continues to v1 — and integrates with Cloud Build for CI/CD pipelines.
BigQuery: Serverless Data Warehouse
BigQuery is GCP’s flagship data analytics service: a serverless, highly scalable data warehouse that runs SQL queries across petabytes of data. It separates compute from storage — BigQuery Storage API stores the data, and the query engine allocates compute resources elastically.
Key features:
- Columnar storage format (Capacitor) provides 10x compression compared to row-oriented storage
- Automatic re-optimization of query execution plans based on previous runs
- BI Engine caches frequently queried data in memory for sub-second response times
- Omni enables cross-cloud analytics on data stored in AWS S3 and Azure Blob Storage
-- Analyze public dataset
SELECT contributor, COUNT(*) as commits
FROM `bigquery-public-data.github_repos.sample_commits`
WHERE committer.date > '2025-01-01'
GROUP BY contributor
ORDER BY commits DESC
LIMIT 20;Google Kubernetes Engine (GKE)
Kubernetes was born at Google (derived from Borg), and GKE remains the most mature managed Kubernetes service available. GKE automates cluster provisioning, node pool management, upgrades, and repairs. Features like Autopilot clusters provide a fully managed Kubernetes experience where Google handles the node infrastructure entirely.
gcloud container clusters create app-cluster \
--region us-central1 \
--num-nodes=3 \
--machine-type=e2-standard-4 \
--enable-autoscaling \
--max-nodes=10 \
--min-nodes=1 \
--release-channel=stableGKE supports Workload Identity for secure Kubernetes-to-Google Cloud service authentication, reducing the need for service account keys. GKE Gateway Controller provides a declarative, Kubernetes-native API for traffic routing that replaces Ingress with enhanced capabilities — multi-cluster routing, traffic mirroring, and cross-namespace configuration.
Data and AI Services
GCP’s competitive advantage is most visible in its data and AI portfolio. Vertex AI is Google’s unified machine learning platform, covering the entire ML lifecycle from data preparation (Vertex AI Data Labeling) to model training (AutoML, custom training with GPUs/TPUs), deployment (Vertex AI Prediction), and monitoring (Vertex AI Model Monitoring for drift detection). Models can be trained on Google’s TPU v5e and v5p pods, purpose-built for ML workloads.
Pub/Sub provides scalable, durable message ingestion with exactly-once delivery and 10x lower latency than AWS SQS for high-throughput event streaming. Pub/Sub integrates with Dataflow (Apache Beam) for stream processing and BigQuery for real-time analytics. Dataflow handles both batch and stream processing with auto-scaling, exactly-once semantics, and integrated schema management.
Cloud Data Fusion provides managed data integration with a visual drag-and-drop interface, powered by the open-source CDAP project. For ETL/ELT workloads, BigQuery Data Transfer Service automates ingestion from Google services (Ads, Campaign Manager, YouTube) and third-party sources (Teradata, Amazon S3, Salesforce).
VPC and Networking
GCP’s Virtual Private Cloud is global — a single VPC spans all regions, unlike AWS where VPCs are region-scoped. This global networking model simplifies multi-region deployments and reduces configuration overhead.
gcloud compute networks create my-global-vpc --subnet-mode=custom
gcloud compute networks subnets create subnet-us \
--network=my-global-vpc \
--region=us-central1 \
--range=10.0.1.0/24
gcloud compute networks subnets create subnet-eu \
--network=my-global-vpc \
--region=europe-west1 \
--range=10.0.2.0/24GCP also provides Cloud CDN for content delivery with cache invalidation via API, Cloud Load Balancing (global anycast, single anycast IP, cross-region failover), and Cloud Armor for DDoS protection and WAF rules with rule sets for OWASP Top 10. Cloud NAT enables outbound internet access for private instances, and Private Service Connect provides private access to Google APIs and managed services without public IPs.
FAQ
How does GCP pricing compare to AWS and Azure? GCP offers sustained use discounts automatically applied (no commitment required), while AWS and Azure require reserved instance purchases for equivalent savings. For compute-heavy workloads, GCP is often 15-25% cheaper than equivalent AWS configurations. BigQuery charges $5 per TB of data scanned, with flat-rate pricing available for high-volume users.
What is the GCP Always Free tier? It includes 2 million Cloud Run requests/month, 1 TB BigQuery queries/month, 5 GB Cloud Storage, 1 f1-micro Compute Engine instance/month, and Cloud Functions (2 million invocations). These never expire.
Is Cloud Run better than AWS Lambda? Cloud Run accepts any containerized application without code changes, supports longer request timeouts (60 minutes), and maintains persistent connections. Lambda requires a function-based programming model and has a 15-minute execution limit. Cloud Run is generally simpler for web applications and API backends; Lambda is better for event processing and highly decoupled workflows.
How do I manage secrets in GCP? Use Secret Manager — it stores API keys, passwords, and certificates with automatic versioning, encryption at rest (AES-256 via Cloud KMS), and fine-grained IAM access control. Integrate with Cloud Run, Cloud Functions, and Compute Engine via workload identity federation.
What is BigQuery Omni and when should I use it? BigQuery Omni runs BigQuery queries against data stored in AWS S3 and Azure Blob Storage without moving the data. Use it when you have multi-cloud data silos and want a unified analytics layer without building cross-cloud data pipelines.
Cloud Computing Overview — Serverless Computing Guide — Cloud Storage Guide
Related Articles
Cloud Computing
Serverless Computing: Architecture and Best Practices
Build serverless applications with AWS Lambda, Azure Functions, and Google Cloud Run. Learn event-driven patterns, cold start mitigation, and cost optimization.
Cloud Computing
AWS Getting Started: Account Setup to First Deployment
Create an AWS account, configure IAM securely, launch EC2 instances, store objects in S3, build serverless APIs with Lambda, and deploy your first cloud application.
Cloud Computing
Cloud Architecture: Microservices, Event-Driven, Design
Learn cloud architecture patterns including microservices, event-driven design, twelve-factor app principles, and scalable cloud-native applications.
Cloud Computing
Cloud Computing Basics: IaaS, PaaS, SaaS, and Models
Learn cloud computing including service models, deployment types, key benefits, and how organizations leverage cloud infrastructure for scalability.
Cloud Computing
Cloud Computing Fundamentals Guide
Learn cloud computing basics, IaaS vs PaaS vs SaaS, public vs hybrid vs multi-cloud, and how to choose the right deployment model for your organization.