{"id":31646119,"url":"https://github.com/codefresh-io/plugin-gke","last_synced_at":"2025-10-07T05:20:20.005Z","repository":{"id":37898373,"uuid":"161207407","full_name":"codefresh-io/plugin-gke","owner":"codefresh-io","description":"Codefresh GKE Plugin","archived":false,"fork":false,"pushed_at":"2022-06-14T18:17:11.000Z","size":11,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-25T14:59:45.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefresh-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-10T16:55:14.000Z","updated_at":"2021-07-29T10:41:52.000Z","dependencies_parsed_at":"2022-08-19T23:40:59.693Z","dependency_job_id":null,"html_url":"https://github.com/codefresh-io/plugin-gke","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codefresh-io/plugin-gke","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fplugin-gke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fplugin-gke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fplugin-gke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fplugin-gke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefresh-io","download_url":"https://codeload.github.com/codefresh-io/plugin-gke/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fplugin-gke/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T05:20:13.315Z","updated_at":"2025-10-07T05:20:19.993Z","avatar_url":"https://github.com/codefresh-io.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codefresh GKE plugin\n\nUse Codefresh GKE plugin to create GKE Kubernetes cluster for integration tests \n\n\n## codefresh/plugin-gke Docker Image details\n\n### Requirements:\n  - set GOOGLE_SERVICE_ACCOUNT_KEY to the Google Service Account Key value\n  - Service account should have enough permissions to create and operate GKE Cluster:\n    Kubernetes Engine Admin or subset of privileges from GKE Developer+clusterAdmin  \n\n### Environements:\n  - GOOGLE_SERVICE_ACCOUNT_KEY - Google Service Account Key value, mandatory\n\n  - CLOUDSDK_COMPUTE_ZONE - one of valid Google Compute zones - see https://cloud.google.com/compute/docs/regions-zones/\n  - CLOUDSDK_COMPUTE_REGION - one of valid Google Compute regions. If both CLOUDSDK_COMPUTE_ZONE and CLOUDSDK_COMPUTE_REGION are not set, default is us-central1\n  \n  - GKE_CLUSTER_NAME - name of gke cluster to create  \n  \n  - Codefresh variables: https://docs.codefresh.io/docs/variables\n\n### Commands: \n\n* `gke-create` - creates GKE cluster on Google Cloud project defined by GOOGLE_SERVICE_ACCOUNT_KEY\n  - `gcloud container clusters create \u003cGKE_CLUSTER_NAME\u003e \u003coptional parameters\u003e`\n  - sets kubectl current context to the newly created cluster for futher pipeline steps\n\n* `gke-delete` - deletes GKE Cluster by name on Google Cloud project defined by GOOGLE_SERVICE_ACCOUNT_KEY\n  \n* `kubectl` - you can use it to operate on the created cluster \n* `gcloud`\n\n#### Google Cloud Zone/Region note\n`--zone=\u003czone\u003e` or `--region=\u003cregion\u003e` parameters are mandatory for `gcloud container clusters ...` commands\nBy default we are using default zone of us-central1 region\nYou can change it by specifying yours `--zone= | --region= ` or using `CLOUDSDK_COMPUTE_ZONE | CLOUDSDK_COMPUTE_ZONE` env vars\nIf you specified `--zone= | --region= ` for `gke-create` you must specify the same zone/region parameters for `gke-delete` \n\n## Usage\n\nSet the environment variables and add the following step to your Codefresh pipeline:\n\n```yaml\n---\nversion: '1.0'\n\nsteps:\n  # \n  create-cluster:\n    image: codefresh/plugin-gke\n    commands: \n        - gke-create gke-test-cluster-1 --zone=us-central1-a --num-nodes 2 --machine-type n1-standard-2\n    \n  deploy-my-service:\n    image: codefresh/plugin-gke\n    commands:\n        - kubectl get pods --all-namespaces -owide\n       # - deploy.sh\n       # - kubectl run --image mytestimage\n       # - check-status.sh\n\n  clean:\n     image: codefresh/plugin-gke\n     commands:\n        - gke-delete gke-test-cluster-1 --zone=us-central1-a \n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fplugin-gke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefresh-io%2Fplugin-gke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fplugin-gke/lists"}