astroctl cloud gcp selfHosted setup
Create GCP resources and auto-store credentials in vault
Synopsis
Create the GCP resources needed for a self-hosted Kubernetes cluster, then store the generated credentials in AstroPulse's encrypted vault.
AstroPulse plans the setup and hands back the gcloud commands, checks the service account key against your project before storing it, and records every step: 'astroctl cloud gcp selfHosted status'.
After setup completes, your cluster YAML uses vault credentials:
provisioner:
type: selfHosted
selfHosted:
accountId: "my-project"
bucketName: "acme-cluster-state" # the bucket setup created
credentials:
type: Vault
Resources created:
- Dedicated service account with 8 IAM roles
- 5 required GCP APIs enabled
- GCS bucket for cluster state
- Service account key (auto-stored in vault)
The commands open Cloud Shell as your browser's default Google account. Pass --account with the email of the Google account that owns the project to open Cloud Shell as that account; it must be signed in to the browser. The commands first print the account gcloud runs as, and stop before creating anything when it is not the --account one or cannot open the project.
Running the commands here requires the gcloud CLI, installed and authenticated.
astroctl cloud gcp selfHosted setup [flags]
Examples
# Setup creates everything and stores credentials in vault
astroctl cloud gcp selfHosted setup --project-id my-proj --region us-central1 \
--cluster-name prod
# Open Cloud Shell as the Google account that owns the project
astroctl cloud gcp selfHosted setup --project-id my-proj --region us-central1 \
--cluster-name prod --account owner@example.com
Options
--account string Email of the Google account that owns the project; Cloud Shell opens as it when it is signed in to the browser
--cluster-name string Cluster name (used for resource naming and vault storage) (required)
-h, --help help for setup
--project-id string GCP project ID (required)
--region string GCP region (e.g., us-central1) (required)
Options inherited from parent commands
-o, --output string Output format (table|json|yaml) (default "table")
SEE ALSO
- astroctl cloud gcp selfHosted - Self-hosted cluster prerequisite management