{"id":19547215,"url":"https://github.com/untoldwind/kube-database-creator","last_synced_at":"2026-05-07T19:02:03.875Z","repository":{"id":136373071,"uuid":"306613519","full_name":"untoldwind/kube-database-creator","owner":"untoldwind","description":"Automates the creation of database for microservices","archived":false,"fork":false,"pushed_at":"2020-10-23T14:27:43.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-10T20:18:07.250Z","etag":null,"topics":["database","kubernetes","microservice"],"latest_commit_sha":null,"homepage":"","language":"Go","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/untoldwind.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}},"created_at":"2020-10-23T11:17:27.000Z","updated_at":"2024-06-19T07:56:16.232Z","dependencies_parsed_at":null,"dependency_job_id":"167cfc3c-0249-465d-9795-e7e1c963e18b","html_url":"https://github.com/untoldwind/kube-database-creator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untoldwind%2Fkube-database-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untoldwind%2Fkube-database-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untoldwind%2Fkube-database-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untoldwind%2Fkube-database-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untoldwind","download_url":"https://codeload.github.com/untoldwind/kube-database-creator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240802091,"owners_count":19859917,"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":["database","kubernetes","microservice"],"created_at":"2024-11-11T03:48:57.259Z","updated_at":"2026-05-07T19:01:58.825Z","avatar_url":"https://github.com/untoldwind.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-database-creator\n\nAutomates the creation of application databases in a microservice environments.\n\nOne of the key aspects of a microservice architecture is that each server should have its own database isolated from all the other services. So when adding a new microservice to the system there is usually a task to create a new database and database-user for this service. \n\n`kube-database-creator` automates this task, in the regard that a service just has declare its need for a database via a kubernetes ConfigMap, the creation of the database itself together with the required credentials.\n\nNote: The tool just *creates* databases. It is not supposed to automatically clean it up afterwards, i.e. it will not delete or try to delete anything. (Just in case you are worring about losing valuable data.)\n\n## Current state\n\nThis is a very basic implementation only supporting postgres so far.\n\nThings that need to be added:\n* A secrets store backend for HashiCorp vault (so that the application not even sees the admin-user-credentials)\n* Support for some other common database: MySql, MariaDB, you name it.\n* Support for monitoring/altering in case something went wrong during creation.\n\n## Example\n\nAn example configuration can be found in `example/example.yaml`. Which can be used like this:\n\n```\nkubectl apply -f example/example.yaml\n```\n\nWhich will create a namespace `creator-example` containing a postgres database and a `kube-database-creator`.\n\nInitially you can connect to the postgres instance via port-forwarding:\n```\nkubectl -n creator-example port-forward service/postgres 5432\n```\n\nand then (in another console or with a postgres toll of your choice):\n```\npsql -h localhost -U postgres -W postgres\n```\n(The password is `verysecretmasterpassword` btw.)\n\nInitially it should just contains the basic postgres tables.\n\nNow imaging a new microservice `demo-app` in need of its own datbase. In this case one just has to do:\n```\nkubectl apply -f example/demo-app.yaml\n```\n\nIf you now look into the postgres again you will see that a database `demo_app_db` has been created, together with a kubernetes secret to access it. The database password for the application is randomly generated and only available via that kubernetes secret.\n\nTo check if you can connect into the `demo-app` with:\n```\nkubectl -n creator-example exec -ti demo-app -- bash\n```\n\nand do a:\n```\nPGPASSWORD=$DEMO_APP_DB_PASSWORD psql -h postgres.creator-example.svc.cluster.local -U $DEMO_APP_DB_USER $DEMO_APP_DB_NAME\n```\ninside.\n\nTo clean this mess up just do a\n```\nkubectl delete -f example/example.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtoldwind%2Fkube-database-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtoldwind%2Fkube-database-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtoldwind%2Fkube-database-creator/lists"}