{"id":13645492,"url":"https://github.com/doitintl/ClusterCloner","last_synced_at":"2025-04-21T14:31:16.154Z","repository":{"id":86290477,"uuid":"270327661","full_name":"doitintl/ClusterCloner","owner":"doitintl","description":"Clone Kubernetes clusters (VM infrastructure, not K8s objects) to/from AWS EKS, GCP GKE, and Azure EKS.","archived":false,"fork":false,"pushed_at":"2023-02-14T16:12:11.000Z","size":427,"stargazers_count":33,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-20T15:07:31.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doitintl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-06-07T14:15:24.000Z","updated_at":"2024-09-14T22:50:04.000Z","dependencies_parsed_at":"2024-01-14T09:38:50.805Z","dependency_job_id":"e81c281f-7c64-419d-8995-45ebb4fbd10a","html_url":"https://github.com/doitintl/ClusterCloner","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2FClusterCloner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2FClusterCloner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2FClusterCloner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2FClusterCloner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doitintl","download_url":"https://codeload.github.com/doitintl/ClusterCloner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070173,"owners_count":21369839,"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":[],"created_at":"2024-08-02T01:02:35.868Z","updated_at":"2025-04-21T14:31:15.748Z","avatar_url":"https://github.com/doitintl.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Cluster Cloner\nReads the Kubernetes clusters in one location (optionally filtering by labels) and\nclones them into another (or just outputs JSON as a dry run), to/from AWS, GCP, and Azure.\n\n# Article\nThe Cluster Cloner project is discussed [in this article](https://blog.doit-intl.com/you-can-handle-the-pods-but-what-about-the-clusters-486fbdb5345d),\nand the different cluster models are compared.\n\n# Usage\nFor usage, run  `clustercloner --help`\n\n# Setup\n## Add Credentials  in local development environment\n- Add a file `credentials-cluster-manager.json` (or another file name) with credentials for a service account with the Kubernetes Cluster Admin role (to read and create clusters).\n  - This is loaded through the `GOOGLE_APPLICATION_CREDENTIALS` environment variable, which you should set to `credentials-cluster-manager.json`\n   (or other file name). If this environment variable is not set, your logged-in `gcloud` account will be used.\n- Add a file `.env` with Azure credentials.\n  - Use `.env.tpl` as a template.\n  - The user should have the  Azure Kubernetes Service Cluster Admin Role.\n- Add a file `awscredentials` with AWS credentials.\n  - The application uses the `AWS_SHARED_CREDENTIALS_FILE` environment variable to find this file, but `awscredentials` is the default.\n  - Use `awscredentials.tpl` as a template.\n  - The user should have the policy\n discussed [here](https://docs.aws.amazon.com/eks/latest/userguide/security_iam_id-based-policy-examples.html).\n Specific example [here](https://github.com/weaveworks/eksctl/issues/204#issuecomment-631630355)\n\n## Define Secrets for GitHub Continuous Integration\n- Not needed for local build.\n- Store the base-64 encodings, for example echo `my-credential.json |base64`\n- For GitHub CI, please specify the following Secrets in GitHub:\n  - `AZ_ENV_BASE64`  `.env` file with Azure credentials for the application, following  `.env.tpl` as a template.\n  - `AWS_CREDENTIALS_BASE64` AWS credentials file for the application. Use `awscredentials.tpl` as a template.\n  - `GCP_CLUSTER_MANAGER_KEYJSON_BASE64` Google credentials file (JSON) for the application.\n  - `GCR_PUSHER_KEYJSON_BASE64` Google credentials file (JSON) with role Storage Admin for pushing to your GCR registry\n  - `DOCKER_REGISTRY` - Registry to which the GitHub action with authenticate, for example `gcr.io`.\n  - `DOCKER_REPOSITORY` - _optional_. For example `gcr.io/my-gcp-project/image-name`.\nIf missing, the value defaults to `$GITHUB_REPOSITORY`, in the form `user/repo`.\n\n## Building\n### Docker Docker\nThe Docker image is built in Github Workflows.\nIn development, you can run  `DOCKER_BUILDKIT=1 docker build -t \u003cTAG\u003e .` (Don't forget that final dot.)\n\n### Using `make`\nIn the GitHub actions, `make` is used to build the application.\n\nIn development:\n#### Build\nPlain `make` to format, lint and build\n#### Lint and format\n`make lint` and `make fmt`\n#### Unit tests\n`make test-short`\n#### Integration and unit tests\n`make test`. Before running, make sure that your Google Project and\nAzure Group are set up (see \"Credentials\" above) and have the same name.\nThe full suite can take up to an hour.\n\n# Credits\nThis project was started from the [goapp](https://github.com/alexei-led/goapp) template,\na bootstrap project for Go CLI applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2FClusterCloner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoitintl%2FClusterCloner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2FClusterCloner/lists"}