// Google Cloud Platform services including GKE, Cloud Run, Cloud Storage, BigQuery, and Pub/Sub. Activate for GCP infrastructure, Google Cloud deployment, and GCP integration.
| name | gcp |
| description | Google Cloud Platform services including GKE, Cloud Run, Cloud Storage, BigQuery, and Pub/Sub. Activate for GCP infrastructure, Google Cloud deployment, and GCP integration. |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep"] |
Provides comprehensive Google Cloud Platform capabilities for the Golden Armada AI Agent Fleet Platform.
Activate this skill when working with:
```bash
gcloud init
gcloud auth login gcloud auth application-default login
gcloud config set project PROJECT_ID
gcloud config list gcloud info ```
```bash
gcloud container clusters create golden-armada-cluster
--zone us-central1-a
--num-nodes 3
--machine-type e2-standard-4
--enable-autoscaling --min-nodes 1 --max-nodes 10
gcloud container clusters get-credentials golden-armada-cluster --zone us-central1-a
gcloud container clusters list
gcloud container clusters resize golden-armada-cluster --num-nodes 5 --zone us-central1-a
gcloud container clusters delete golden-armada-cluster --zone us-central1-a ```
```bash
gcloud run deploy golden-armada-api
--image gcr.io/PROJECT_ID/agent:latest
--platform managed
--region us-central1
--allow-unauthenticated
--set-env-vars "ENV=production"
gcloud run services list
gcloud run services describe golden-armada-api --platform managed --region us-central1 --format 'value(status.url)'
gcloud run services update-traffic golden-armada-api
--to-revisions REVISION=100
```
```bash
gsutil mb -l us-central1 gs://golden-armada-data
gsutil cp local-file.txt gs://bucket-name/ gsutil cp gs://bucket-name/file.txt . gsutil -m cp -r ./local-dir gs://bucket-name/
gsutil ls gs://bucket-name/
gsutil rsync -r ./local-dir gs://bucket-name/dir/
gsutil iam ch allUsers:objectViewer gs://bucket-name ```
```bash
bq mk --dataset PROJECT_ID:agents_dataset
bq mk --table agents_dataset.agent_logs schema.json
bq query --use_legacy_sql=false
'SELECT * FROM project.dataset.table LIMIT 10'
bq load --source_format=NEWLINE_DELIMITED_JSON
agents_dataset.logs gs://bucket/logs/*.json
bq extract --destination_format NEWLINE_DELIMITED_JSON
agents_dataset.logs gs://bucket/export/logs-*.json
```
```bash
gcloud pubsub topics create agent-events
gcloud pubsub subscriptions create agent-events-sub
--topic agent-events
gcloud pubsub topics publish agent-events
--message '{"event": "agent_started", "agent_id": "123"}'
gcloud pubsub subscriptions pull agent-events-sub --auto-ack ```
```python from google.cloud import storage, bigquery, pubsub_v1
storage_client = storage.Client() bucket = storage_client.bucket('golden-armada-data')
blob = bucket.blob('agents/config.json') blob.upload_from_string(json.dumps(config))
blob = bucket.blob('agents/config.json') content = blob.download_as_string()
bq_client = bigquery.Client()
query = """
SELECT agent_id, COUNT(*) as task_count
FROM project.dataset.tasks
GROUP BY agent_id
ORDER BY task_count DESC
"""
results = bq_client.query(query)
for row in results:
print(f"{row.agent_id}: {row.task_count}")
table_ref = bq_client.dataset('agents_dataset').table('logs') errors = bq_client.insert_rows_json(table_ref, rows)
publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path('project-id', 'agent-events')
future = publisher.publish( topic_path, json.dumps({"event": "task_completed"}).encode(), agent_id="123" ) message_id = future.result()
subscriber = pubsub_v1.SubscriberClient() subscription_path = subscriber.subscription_path('project-id', 'agent-events-sub')
def callback(message): print(f"Received: {message.data}") message.ack()
streaming_pull_future = subscriber.subscribe(subscription_path, callback=callback) ```
```hcl provider "google" { project = var.project_id region = var.region }
resource "google_container_cluster" "primary" { name = "golden-armada-cluster" location = var.zone
remove_default_node_pool = true initial_node_count = 1
network = google_compute_network.vpc.name subnetwork = google_compute_subnetwork.subnet.name }
resource "google_container_node_pool" "primary_nodes" { name = "primary-node-pool" location = var.zone cluster = google_container_cluster.primary.name node_count = 3
node_config { machine_type = "e2-standard-4" oauth_scopes = [ "https://www.googleapis.com/auth/cloud-platform" ] }
autoscaling { min_node_count = 1 max_node_count = 10 } }
resource "google_cloud_run_service" "agent_api" { name = "golden-armada-api" location = var.region
template { spec { containers { image = "gcr.io/${var.project_id}/agent:latest" env { name = "ENV" value = "production" } } } }
traffic { percent = 100 latest_revision = true } }
resource "google_storage_bucket" "data" { name = "golden-armada-data" location = var.region
uniform_bucket_level_access = true
lifecycle_rule { condition { age = 30 } action { type = "Delete" } } } ```