{"id":20585495,"url":"https://github.com/syngenta/k8s-deploy","last_synced_at":"2025-04-14T21:09:37.708Z","repository":{"id":10201970,"uuid":"64157984","full_name":"syngenta/k8s-deploy","owner":"syngenta","description":"Ruby gem that helps automate deployments to Google Kubernetes Engine","archived":false,"fork":false,"pushed_at":"2023-05-12T13:48:38.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-14T21:09:22.818Z","etag":null,"topics":["deployment","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syngenta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-25T18:22:53.000Z","updated_at":"2023-07-26T09:29:19.000Z","dependencies_parsed_at":"2022-08-08T13:00:19.425Z","dependency_job_id":null,"html_url":"https://github.com/syngenta/k8s-deploy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syngenta%2Fk8s-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syngenta%2Fk8s-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syngenta%2Fk8s-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syngenta%2Fk8s-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syngenta","download_url":"https://codeload.github.com/syngenta/k8s-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961237,"owners_count":21189993,"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","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":["deployment","kubernetes"],"created_at":"2024-11-16T07:08:19.831Z","updated_at":"2025-04-14T21:09:37.686Z","avatar_url":"https://github.com/syngenta.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-deploy — automate deployments to Google Kubernetes Engine\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Tasks](#tasks)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nThis gem provides a bunch of useful **Rake** tasks to automate deployment to the Kubernetes cluster in Google Kubernetes Engine (GKE):\n\n- Show configuration for the environment.\n- Show the status of running Deployment \u0026 Pods.\n- Check GCloud/K8s configuration and GIT (branch, uncommitted changes, etc.).\n- Build a new Docker image, push it to the registry, and patch Deployment.\n- Rollback Deployment to the previous state.\n- Scale Deployment to the desired number of replicas.\n\n## Installation\n\n### Bundler\n\nAdd the gem to your Gemfile:\n\n```ruby\ngem 'k8s-deploy'\n```\n\n### Manual\n\nInvoke the following command from your terminal:\n\n```shell\ngem install k8s-deploy\n```\n\n## Configuration\n\n1. Put the `k8s-deploy.yml` configuration file into your project root.\n2. Add `require 'k8s-deploy/tasks'` line to your Rakefile.\n3. Check available tasks with `rake -T` command.\n\n### Example of k8s-deploy.yml\n\n```yml\nproduction: # environment name\n  git_branch: main\n  dockerfile: ./Dockerfile\n  docker_platform: linux/amd64\n  container_registry: gcr.io\n  gcloud_project_name: your-gcloud-project-name\n  kubernetes_context: your-cluster-context\n  kubernetes_deployment_name: your-deployment-name\n  kubernetes_template_name: your-template-name\n  kubernetes_docker_image_name: your-dcoker-image-name\n```\n\nYou could add as many environments as you need (production, staging, test, etc.) to `k8s-deploy.yml`.\n\n### Example of Rakefile file\n\n```ruby\nrequire 'k8s-deploy/tasks'\n```\n\n### Example of `rake -T` output\n\n```shell\nrake k8s:production:check                         # Check production ready for deploy\nrake k8s:production:check:gcloud                  # Check production GCloud\nrake k8s:production:check:git                     # Check production GIT\nrake k8s:production:configuration                 # Show production configuration\nrake k8s:production:deploy                        # Deploy to production\nrake k8s:production:deploy:build                  # Build container for production\nrake k8s:production:deploy:deployment_patch       # Deployment patch for production\nrake k8s:production:deploy:push                   # Push container for production\nrake k8s:production:deploy:rollback               # Rollback last deployment to production\nrake k8s:production:deploy:scale[replicas_count]  # Scale deployment production\nrake k8s:production:status                        # Show production K8s status\nrake k8s:production:status:deployment             # Show production K8s Deployment status\nrake k8s:production:status:docker_image           # Show production K8s Deployment status\nrake k8s:production:status:pods                   # Show production K8s Pods status\n```\n\n## Tasks\n\nAll tasks have next structure:\n\n```shell\nrake k8s:\u003cenvironment\u003e:\u003cmain-task\u003e:\u003csub-task\u003e\n```\n\n### Main tasks\n\nShow configuration for the environment:\n\n```shell\nrake k8s:\u003cenvironment\u003e:configuration\n```\n\nShow the status of running Deployment \u0026 Pods:\n\n```shell\nrake k8s:\u003cenvironment\u003e:status\n```\n\nCheck GCloud/K8s configuration and GIT (branch, uncommitted changes, etc.):\n\n```shell\nrake k8s:\u003cenvironment\u003e:check\n```\n\nBuild a new Docker image, push it to the registry, and patch Deployment:\n\n```shell\nrake k8s:\u003cenvironment\u003e:deploy\n```\n\nRollback Deployment to the previous state.\n\n```shell\nrake k8s:\u003cenvironment\u003e:rollback\n```\n\nScale Deployment to the desired number of replicas.\n\n```shell\nrake k8s:\u003cenvironment\u003e:scale[1]\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/syngenta/k8s-deploy](https://github.com/syngenta/k8s-deploy).\n\nPlease, check our [Contribution guide](CONTRIBUTING.md) for more details.\n\nThis project adheres to the [Code of Conduct](CODE_OF_CONDUCT.md). We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.\n\n## License\n\nThe project uses the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyngenta%2Fk8s-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyngenta%2Fk8s-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyngenta%2Fk8s-deploy/lists"}