{"id":21276822,"url":"https://github.com/u8sand/kube-compose","last_synced_at":"2026-05-08T09:33:42.919Z","repository":{"id":214246032,"uuid":"736050719","full_name":"u8sand/kube-compose","owner":"u8sand","description":"An opinionated way of deploying docker-compose to kubernetes clusters by managing them with a helm chart.","archived":false,"fork":false,"pushed_at":"2026-03-31T15:47:39.000Z","size":103,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T17:43:22.732Z","etag":null,"topics":["docker-compose","helm","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Python","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/u8sand.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":"2023-12-26T21:04:23.000Z","updated_at":"2026-03-31T15:47:41.000Z","dependencies_parsed_at":"2024-05-08T13:44:41.996Z","dependency_job_id":"9789cf1b-9cfa-4c14-98ca-2dff005a1a64","html_url":"https://github.com/u8sand/kube-compose","commit_stats":null,"previous_names":["u8sand/kube-compose"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/u8sand/kube-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8sand%2Fkube-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8sand%2Fkube-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8sand%2Fkube-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8sand%2Fkube-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u8sand","download_url":"https://codeload.github.com/u8sand/kube-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u8sand%2Fkube-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32774952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker-compose","helm","kubernetes"],"created_at":"2024-11-21T09:52:12.682Z","updated_at":"2026-05-08T09:33:42.907Z","avatar_url":"https://github.com/u8sand.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-compose\n\nAn opinionated way of deploying docker-compose to kubernetes clusters by managing them with a helm chart.\n\nThe CLI is intended to be easy to use for those familiar with docker-compose and includes some additional features. Basically all features expect you to have a `docker-compose.yaml` file in the working directory.\n\n- `kube-compose init` =\u003e specify the helm release name/namespace in your `docker-compose.yaml` file\n- docker-compose-like features\n  - `kube-compose up` =\u003e `helm install/upgrade` + volume create (pvc)\n  - `kube-compose down` =\u003e `helm uninstall`\n  - `kube-compose ps` =\u003e `helm status`\n  - `kube-compose logs SERVICE` =\u003e `kubectl logs`\n  - `kube-compose exec SERVICE` =\u003e `kubectl exec`\n  - `kube-compose restart SERVICE` =\u003e `kubectl rollout restart`\n  - `kube-compose top SERVICE` =\u003e `kubectl exec pod -- cat /proc/*/stats`\n  - `kube-compose stats SERVICE` =\u003e `kubectl top pod`\n  - `kube-compose events SERVICE` =\u003e `kubectl events`\n  - `kube-compose start SERVICE` =\u003e `kubectl scale --replicas={compose_defined}`\n  - `kube-compose scale SERVICE` =\u003e `kubectl scale --replicas={user_specified}`\n  - `kube-compose stop SERVICE` =\u003e `kubectl scale --replicas=0`\n- helm-like features\n  - `kube-compose ls` =\u003e `helm list`\n  - `kube-compose template` =\u003e `helm template`\n  - `kube-compose history` =\u003e `helm history`\n  - `kube-compose status` =\u003e `helm status`\n  - `kube-compose get WHAT` =\u003e `helm get WHAT`\n  - `kube-compose rollback REVISION` =\u003e `helm rollback REVISION`\n- additional features\n  - `kube-compose volume ...` =\u003e manage docker-compose defined volumes as persistent volume claims\n    - `kube-compose volume create [VOLUME]` =\u003e create the claim(s)\n    - `kube-compose volume rm [VOLUME]` =\u003e delete the claim(s)\n  - `kube-compose diff` =\u003e `diff -Naur \u003c(helm get values) \u003c(docker-compose config)`\n  - `kube-compose drift` =\u003e `helm template | kubectl diff -f -`\n  - `kube-compose version SERVICE [\u003cnewversion\u003e | major | minor | patch]` =\u003e like npm version but for services in the docker-compose.yaml\n  - `kube-compose port-forward SERVICE local:remote`\n\n## Pre-requisites\n- kubernetes cluster\n- kubectl\n- helm\n- docker-compose\n\n## Usage\n```bash\n# use right away with uvx\nuvx kube-compose --help\n\n# install as cli with pipx\npipx install kube-compose\nkube-compose --help\n\n# install off of pypi\npip install kube-compose\n```\n\n## CLI Usage with Docker\n```bash\n# Assuming your kubeconfig is at the default location ~/.kube/config\nalias kube-compose=\"docker run -v .:/work -v ~/.kube/config:/work/.kube/config -it u8sand/kube-compose\"\n\n# verify install was successful\nkube-compose --help\n```\n\n## End-to-end Example with K3D\n```bash\n# launch a test kubernetes cluster\nk3d cluster create -a1 -p \"80:80@loadbalancer\" -p \"443:443@loadbalancer\"\n\n# one option for auto-creating Ingress resources from annotations on the deployment\nhelm repo add maayanlab https://maayanlab.github.io/helm-charts\nhelm install kubernetes-auto-ingress maayanlab/kubernetes-auto-ingress --set ingressClassName=traefik\n\n# with one of the unit tests\ncd tests/units/simple\n# OR for testing the current source base\n# alias kube-compose=\"python -m kube_compose -f tests/units/simple/docker-compose.yaml\"\n\n# start the docker-compose service(s) on the kubernetes cluster\nkube-compose up\n# check the status of the kubernetes resources\nkube-compose ps\n# check logs of a service\nkube-compose logs test-web\n# get into the service container\nkube-compose exec -it test-web /bin/sh\n# restart a service\nkube-compose restart test-web\n# see top processes running on the service\nkube-compose top test-web\n# see cpu/memory being used by the service\nkube-compose stats test-web\n# see any events that may have occurred for the service\nkube-compose events test-web\n# stop the service temporarily\nkube-compose stop test-web\n# start it back up\nkube-compose start test-web\n# scale the service up\nkube-compose scale test-web=2\n\n# we can see helm charts (like kube-compose deployed things) deployed to the cluster with\nkube-compose ls --context k3d-k3s-default\n# we can get the actual deployment kubernetes would use with\nkube-compose template\n# we can see what revision we're at/when it was updated with\nkube-compose history\nkube-compose status\n# we can rollback (with optional version number) if a change we made was bad with\nkube-compose rollback\n# we can get information like the docker-compose.yaml that was deployed with\nkube-compose get values\n# we can access cluster services locally with port-forward hostport:containerport\nkube-compose port-forward test-web 8080:80\n# we can manage persistent volumes with the volume subcommand\nkube-compose volume ls\n# we can version image in the docker-compose\nkube-compose version test-web 1.0.0\n# we can diff our local docker-compose with the one that is deployed\nkube-compose diff\n# we can use drift to see if the deployment spec has been modified outside of kube-compose\nkube-compose drift\n# let's revert that change\nkube-compose version test-web latest\n\n# remove it from the cluster (with volumes, otherwise they stay)\nkube-compose down -v\n\n# remove test cluster\nk3d cluster delete\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8sand%2Fkube-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu8sand%2Fkube-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu8sand%2Fkube-compose/lists"}