Book a demo

← Documentation

GKE Deployer Parameters for OpenLegacy Hub

OpenLegacy Hub's GKE deployer requires specific JSON parameters for authentication and deployment targeting.

Default Configuration Template

{
"replicas": 1,
"namespace": "default",
"selector": {},
"kubeConfig": null,
"makePublic": false,
"masterUrl": null,
"token": null,
"projectId": null,
"clusterName": null,
"zone": null,
"serviceAccountKey": null,
"clientId": null,
"clientSecret": null,
"useApplicationDefaultCredentials": false,
"enableIngress": false,
"ingressClass": "gce",
"awaitTimeout": 10000
}

Parameter Reference Table

ParameterDescriptionRequiredExample
replicasNumber of pod replicasOptional1
namespaceGKE target namespaceRecommendeddefault
selectorPod selector labelsOptional{}
kubeConfigBase64 kubeconfig (alternative auth)Optionalnull
makePublicCreate public LoadBalancer serviceOptionalfalse
masterUrlGKE cluster endpoint (auto-discovered)Optionalnull
tokenKubernetes service account tokenOptionalnull
projectIdGCP project IDRequiredmy-gke-project-123
clusterNameGKE cluster nameRequiredmy-production-cluster
zoneGKE cluster zone/region Zone: us-central1-a Region: us-central1Requiredus-central1-a
serviceAccountKeyBase64 JSON service account key (preferred)Recommended[base64-key]
clientIdOAuth2 client ID (app credentials)With OAuth[client-id]
clientSecretOAuth2 client secretWith OAuth[client-secret]
useApplicationDefaultCredentialsUse gcloud ADC (runs on GCP VM)With ADCtrue
enableIngressCreate Google Cloud IngressOptionalfalse
ingressClassIngress controller classWith Ingressgce / nginx
awaitTimeoutDeployment readiness timeout (ms)Recommended10000

Authentication Options (Choose One)

Option 1: Service Account Key (Recommended)

projectId: "my-project"
clusterName: "my-cluster"
zone: "us-central1-a"
serviceAccountKey: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."

Option 2: OAuth2 App Credentials

projectId: "my-project"
clientId: "123456.apps.googleusercontent.com"
clientSecret: "GOCSPX-abc123"

Option 3: Application Default Credentials

useApplicationDefaultCredentials: true

Requires: gcloud auth application-default login

Setup Instructions

  1. Create Service Account:
    gcloud iam service-accounts create ol-hub-deployer \
      --project=my-project
    
  2. Grant Permissions:
    gcloud projects add-iam-policy-binding my-project \
      --member="serviceAccount:ol-hub-deployer@my-project.iam.gserviceaccount.com" \
      --role="roles/container.clusterAdmin"
    
  3. Download Key:
    gcloud iam service-accounts keys create key.json \
      --iam-account=ol-hub-deployer@my-project.iam.gserviceaccount.com
    base64 -w 0 key.json # Copy output to serviceAccountKey
    
  4. Find Cluster Details:
    gcloud container clusters list --project=my-project
    

Ingress Configuration

enableIngress: true
ingressClass: "gce" # Google Cloud Load Balancer OR "nginx" for nginx-ingress

Minimal GKE Config

{
"projectId": "my-gcp-project",
"clusterName": "my-gke-cluster",
"zone": "us-central1-a",
"serviceAccountKey": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"replicas": 1,
"namespace": "default"
}

Security Best Practices

  • Use Workload Identity Federation instead of service account keys when possible
  • Restrict service account to container.developer role minimum
  • Enable Workload Identity on GKE cluster
  • Rotate keys every 90 days
  • Use regional clusters (zone: "us-central1") for HA

This configuration deploys OpenLegacy APIs to GKE with Google Cloud authentication and optional Ingress exposure.

Read more

Tell us about yourself

You've been browsing the catalog. Leave your details to keep exploring.

Privacy policy