Cloud CLI¶
The commands you actually use across AWS, GCP, Azure, Kubernetes, and Terraform.
AWS CLI¶
Identity & Auth¶
Check who you're authenticated as:
List configured profiles:
Use a specific profile:
S3¶
List buckets:
Sync a local directory to S3:
Download a file:
CloudWatch Logs¶
Tail logs in real time:
Install:
brew install awscli·pip install awscli
Google Cloud (gcloud)¶
Auth & Config¶
Login interactively:
Set the active project:
List active configuration:
Compute¶
SSH into a VM:
Cloud Run¶
Deploy a container:
Install:
brew install google-cloud-sdk
Azure (az)¶
Login:
List subscriptions:
Set active subscription:
Install:
brew install azure-cli
kubectl (Kubernetes)¶
Context & Namespace¶
List contexts:
Switch context:
Set default namespace:
Pods¶
List pods:
View logs:
Exec into a pod:
Port-forward a service to localhost:
Quick Debug¶
Get events sorted by time:
Describe a failing pod:
Install:
brew install kubectl· comes with Docker Desktop
Terraform¶
Workflow¶
Initialize a project:
Preview changes:
Apply changes:
Destroy all managed resources:
Warning
Always run terraform plan before apply in production environments.
State¶
List managed resources:
Show a specific resource:
Install:
brew install terraform·winget install Hashicorp.Terraform