GCP for DevOps — FAQ

4 minute read

Frequently Asked Questions

Getting Started

Q: Do I need a credit card to use GCP?

Yes, but Google Cloud offers a $300 free credit for 90 days for new accounts. Many services also have an “Always Free” tier with monthly usage limits (e.g., 1 e2-micro VM, 5 GB Cloud Storage, 2 million Cloud Functions invocations).

Q: What’s the difference between GCP and Google Cloud?

“Google Cloud” is the broader brand that includes Google Cloud Platform (GCP), Google Workspace, and other services. In practice, “GCP” and “Google Cloud” are often used interchangeably when referring to the cloud infrastructure platform.

Q: How does GCP compare to AWS and Azure for DevOps?

Feature GCP AWS Azure
Container orchestration GKE (Autopilot) EKS AKS
Serverless containers Cloud Run Fargate Container Apps
CI/CD Cloud Build + Deploy CodePipeline Azure DevOps
IaC Terraform + DM CloudFormation + Terraform Bicep + Terraform
Monitoring Cloud Monitoring CloudWatch Azure Monitor
Strength Kubernetes, data/ML Breadth of services Enterprise integration

IAM & Security

Q: When should I use a service account vs a user account?

Use service accounts for applications, scripts, and automated workflows. Use user accounts only for interactive human access. Never embed user credentials in code or CI/CD pipelines.

Q: What’s the difference between basic roles and predefined roles?

Basic roles (Owner, Editor, Viewer) are broad and grant access to all resources. Predefined roles (e.g., roles/compute.instanceAdmin) are granular and follow least privilege. Always prefer predefined roles in production.

Compute & Containers

Q: Should I use GKE Standard or GKE Autopilot?

Choose Autopilot When Choose Standard When
Want managed nodes Need GPU workloads
Pay-per-pod pricing Need DaemonSets
Reduced operations overhead Need custom node configs
Starting new clusters Have specific kernel requirements

Q: When should I use Cloud Run vs GKE?

Use Cloud Run for stateless HTTP services, event-driven workloads, and simple microservices. Use GKE for complex multi-service architectures, stateful workloads, or when you need fine-grained Kubernetes control.

Networking

Q: What’s the difference between Shared VPC and VPC Peering?

Shared VPC allows centralized network management — a host project owns the network and service projects use it. VPC Peering connects two independent VPC networks. Use Shared VPC for enterprise environments; use VPC Peering for connecting separate organizations or legacy setups.

Q: Do I need Cloud NAT?

Yes, if your VMs in private subnets (no external IP) need outbound internet access (e.g., to download packages, call external APIs). Cloud NAT provides outbound-only internet access without exposing your VMs.

CI/CD

Q: Can I use GitHub Actions with GCP instead of Cloud Build?

Yes! You can use GitHub Actions with the google-github-actions/auth and google-github-actions/deploy-cloudrun actions. Cloud Build is GCP-native and integrates tightly with GCP services, but GitHub Actions works well if your code is on GitHub.

Q: What’s the difference between Cloud Build and Cloud Deploy?

Cloud Build handles building, testing, and producing artifacts (CI). Cloud Deploy handles progressive delivery to environments (CD). They work together — Cloud Build produces the artifact, and Cloud Deploy rolls it out to dev → staging → production.

Infrastructure as Code

Q: Should I use Terraform or Deployment Manager?

Use Terraform. It’s the industry standard, multi-cloud, has a huge community, and is actively developed. Deployment Manager is GCP-only, less maintained, and has fewer features.

Q: How should I manage Terraform state?

Store state in a GCS bucket with versioning enabled. Use state locking (built into the GCS backend). Separate state files per environment (dev/staging/prod). Never store state in Git.

Monitoring

Q: What’s the difference between Cloud Monitoring and Cloud Logging?

Cloud Monitoring collects and visualizes time-series metrics (CPU, memory, custom metrics) and manages alerting. Cloud Logging collects, stores, and searches log entries. They complement each other — use both for comprehensive observability.

Q: How do I set good SLOs?

Start with your users’ expectations. Measure availability (% of successful requests) and latency (% of requests under a threshold). A good starting point for most services is 99.9% availability and 95th percentile latency under 200ms.

Cost

Q: How can I avoid surprise GCP bills?

  1. Set budget alerts at 50%, 75%, 90%, and 100%
  2. Enable billing export to BigQuery for analysis
  3. Use labels consistently for cost attribution
  4. Schedule cleanup jobs for dev resources
  5. Review recommender insights weekly
  6. Start with the free tier for learning

Q: Are Spot VMs reliable enough for production?

Not for user-facing workloads. Spot VMs can be preempted with 30 seconds notice. Use them for batch processing, CI/CD builds, data analysis, and ML training — workloads that can handle interruptions.


Congratulations! 🎉

You’ve completed the GCP for DevOps tutorial. You now have the knowledge to:

  • Set up and manage GCP environments for DevOps
  • Build CI/CD pipelines with Cloud Build and Cloud Deploy
  • Run containers on GKE Autopilot and Cloud Run
  • Implement Infrastructure as Code with Terraform
  • Monitor and observe workloads with Cloud Monitoring
  • Secure environments with IAM, VPC Service Controls, and org policies
  • Optimize costs with recommenders, CUDs, and automation

Keep building, keep learning, and keep automating!

← Back to GCP for DevOps Home

Updated: