{"id":22608671,"url":"https://github.com/hedgieinsocks/kubectl-mdba","last_synced_at":"2025-07-29T19:43:37.924Z","repository":{"id":265034205,"uuid":"893929636","full_name":"hedgieinsocks/kubectl-mdba","owner":"hedgieinsocks","description":"🦭 kubectl plugin that helps manage mariadb-operator semi-sync replication clusters","archived":false,"fork":false,"pushed_at":"2025-07-22T13:31:44.000Z","size":79,"stargazers_count":12,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-22T15:25:04.922Z","etag":null,"topics":["bash","kubectl","kubectl-plugin","mariadb","mariadb-operator","semi-sync"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/hedgieinsocks.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}},"created_at":"2024-11-25T13:05:55.000Z","updated_at":"2025-07-22T13:31:47.000Z","dependencies_parsed_at":"2024-11-27T09:33:10.244Z","dependency_job_id":"2bb8d601-08c4-4467-b275-6faa00566567","html_url":"https://github.com/hedgieinsocks/kubectl-mdba","commit_stats":null,"previous_names":["hedgieinsocks/kubectl-mdb","hedgieinsocks/kubectl-mdba"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/hedgieinsocks/kubectl-mdba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedgieinsocks%2Fkubectl-mdba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedgieinsocks%2Fkubectl-mdba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedgieinsocks%2Fkubectl-mdba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedgieinsocks%2Fkubectl-mdba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hedgieinsocks","download_url":"https://codeload.github.com/hedgieinsocks/kubectl-mdba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedgieinsocks%2Fkubectl-mdba/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267745956,"owners_count":24137984,"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-07-29T02:00:12.549Z","response_time":2574,"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":["bash","kubectl","kubectl-plugin","mariadb","mariadb-operator","semi-sync"],"created_at":"2024-12-08T15:08:39.734Z","updated_at":"2025-07-29T19:43:37.852Z","avatar_url":"https://github.com/hedgieinsocks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![kubectl-mdba project cover](img/cover.png)\n\n# 🦭 kubectl-mdba\n\n`kubectl-mdba` (mariadb administrator) is a `kubectl` plugin that helps manage [mariadb-operator](https://github.com/mariadb-operator) semi-sync replication clusters\n\n## Disclaimer\n\n* This project is not affiliated with MariaDB Foundation or MariaDB Operator in any way.\n* It has not been verified by MariaDB Operator, and no representations are made regarding the quality of the upstream software.\n* Written for mariadb-operator `\u003e=v0.38.0`\n\n## Dependencies\n\n* `jq` - https://github.com/jqlang/jq\n\nOptionally, you can install the following tools to improve the output of some commands:\n\n* `bat` - https://github.com/sharkdp/bat\n* `yq` -  https://github.com/mikefarah/yq (or https://github.com/kislyuk/yq)\n\n## Installation\n\n### Krew\n\n```sh\n❯ kubectl krew install mdba\n```\n\n### Manual\n\nPlace `kubectl-mdba` into the directory within your `$PATH` (e.g. `~/.local/bin`)\n\n### Completion\n\nPlace `kubectl_complete-mdba` into the directory within your `$PATH` (e.g. `~/.local/bin`)\n\n## Customization\n\nYou can `export` the following variables to tweak the plugin's behaviour.\n\n| VARIABLE                        | DEFAULT                        | DETAILS                                                                    |\n|---------------------------------|--------------------------------|----------------------------------------------------------------------------|\n| `KMDBA_KUBECTL`                 | `kubectl`                      | kubectl binary name                                                        |\n| `KMDBA_NAMESPACE`               | `default`                      | default k8s namespace                                                      |\n| `KMDBA_RECREATE_STEP`           | `1`                            | initial step number from `1` to `14` for replica recreation                |\n| `KMDBA_BACKUP_THREADS`          | `1`                            | number of threads from `1` to `8` to use for parallel datafiles transfer   |\n| `KMDBA_STREAM_PORT`             | `4444`                         | default port from `1024` to `65535` for backup stream                      |\n| `KMDBA_IGNORE_PRIMARY_MISMATCH` | `0`                            | ignore mismatched desired and current primary pod indexes                  |\n| `KMDBA_BACKUP_DIR`              | `/var/lib/mysql/.kmdba_backup`  | tmp directory in `/var/lib/mysql/` to accept backup stream                 |\n| `KMDBA_RESTORE_DIR`             | `/var/lib/mysql/.kmdba_restore` | tmp directory in `/var/lib/mysql/` for restored backup                     |\n\n## Usage\n\n```\nkubectl mdba helps manage mariadb-operator semi-sync replication clusters\n\nUsage:\n  kubectl mdba \u003ccommand\u003e [\u003ctarget\u003e]\n\nCommands:\n  ls [\u003cmariadb\u003e]            list mariadbs with their pods\n  status \u003cmariadb\u003e          check mariadb status\n  suspend \u003cmariadb\u003e         pause mariadb reconciliation\n  unsuspend \u003cmariadb\u003e       resume mariadb reconciliation\n  enter \u003cpod\u003e               exec into pod\n  sql \u003cpod\u003e                 launch mariadb shell\n  proc \u003cpod\u003e                print processlist\n  du \u003cpod\u003e                  calculate database disk usage\n  top [\u003cpod\u003e]               display cpu and ram usage\n  repl \u003creplica\u003e            check replication status\n  prom \u003creplica\u003e            promote replica to primary\n  recreate \u003creplica\u003e        recreate replica from primary\n\nFlags:\n  -h, --help                show this message\n  -v, --version             show plugin version\n  -n, --namespace \u003cns\u003e      set namespace scope\n\nRecreate Flags:\n  -f, --force               ignore primary index mismatch\n  -p, --port \u003cnum\u003e          port for backup stream (default: 4444)\n  -t, --threads \u003cnum\u003e       parallel threads {1..8} for datafiles transfer (default: 1)\n  -s, --step \u003cnum\u003e          step {1..14} to start from (default: 1)\n```\n\n## Links\n\n* https://mariadb.com/kb/en/setting-up-a-replica-with-mariabackup\n* https://github.com/mariadb-operator/mariadb-operator/issues/141\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedgieinsocks%2Fkubectl-mdba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhedgieinsocks%2Fkubectl-mdba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedgieinsocks%2Fkubectl-mdba/lists"}