{"id":27103036,"url":"https://github.com/nyu-rts/k8s-offsite-replicator","last_synced_at":"2026-07-22T08:30:57.355Z","repository":{"id":281718189,"uuid":"944784453","full_name":"NYU-RTS/k8s-offsite-replicator","owner":"NYU-RTS","description":"Replicates a Kubernetes deployment on a remote machine. Used for failover in case the cluster in unavailable","archived":false,"fork":false,"pushed_at":"2025-03-13T22:28:40.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2026-01-14T02:02:41.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/NYU-RTS.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-08T00:42:55.000Z","updated_at":"2025-03-13T22:28:43.000Z","dependencies_parsed_at":"2025-03-10T20:16:16.409Z","dependency_job_id":"da9726d3-1210-4899-817d-1e6dfe217748","html_url":"https://github.com/NYU-RTS/k8s-offsite-replicator","commit_stats":null,"previous_names":["nyu-rts/k8s-offsite-replicator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NYU-RTS/k8s-offsite-replicator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NYU-RTS%2Fk8s-offsite-replicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NYU-RTS%2Fk8s-offsite-replicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NYU-RTS%2Fk8s-offsite-replicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NYU-RTS%2Fk8s-offsite-replicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NYU-RTS","download_url":"https://codeload.github.com/NYU-RTS/k8s-offsite-replicator/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NYU-RTS%2Fk8s-offsite-replicator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35755760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"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-04-06T16:38:35.782Z","updated_at":"2026-07-22T08:30:57.320Z","avatar_url":"https://github.com/NYU-RTS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a system that replicates a Kubernetes deployment on a remote machine outside of Kubernetes. It is used for failover in case the cluster is unavailable.\n\nA CronJob running on Kubernetes creates clones of designated PersistentVolumeClaims, rsync them to a remote machine, where replicas of the containers are run over a thin clone of the volume (using lvmthin).\n\nThis repository contains both the code for the CronJob, cloning and copying the data, and the remote VM setup, as an Ansible playbook.\n\n# Setup process\n\n1. Get a cloud VM, attach a disk to it for lvmthin volumes\n\n2. Run the ansible playbook against it: `ansible-playbook -u ubuntu --become -v playbook.yaml -i inventory.yaml`\n\n3. Generate an SSH key for syncing: `ssh-keygen -f upload-key -N \"\" -t ed25519`\n\n4. Add the SSH pubkey to the cloud VM: `sudo -Hu uploader sh -c 'mkdir --mode 700 $HOME/.ssh \u0026\u0026 cat \u003e $HOME/.ssh/authorized_keys'`\n\n5. Create the SSH secret on your cluster: `kubectl create secret generic replication \"--from-literal=host-pubkey=$(ssh-keyscan 10.144.1.2)\" --from-file=upload-key=upload-key`\n\n6. Create the CronJob to sync from your cluster: `kubectl apply -f k8s-cronjob.yaml`\n\n7. Deploy your app on the minikube cluster on the cloud VM, changing persistent volumes to use local volumes pointing to `/kube/...`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyu-rts%2Fk8s-offsite-replicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyu-rts%2Fk8s-offsite-replicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyu-rts%2Fk8s-offsite-replicator/lists"}