{"id":39021235,"url":"https://github.com/codemk8/apihub","last_synced_at":"2026-01-17T17:28:33.574Z","repository":{"id":220256172,"uuid":"122725696","full_name":"codemk8/apihub","owner":"codemk8","description":"Deploy APIs Made Easy","archived":false,"fork":false,"pushed_at":"2019-01-08T02:39:12.000Z","size":17705,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-23T11:19:38.520Z","etag":null,"topics":["api","caas","gateway","kong","kubernetes","microservices"],"latest_commit_sha":null,"homepage":null,"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/codemk8.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}},"created_at":"2018-02-24T09:34:30.000Z","updated_at":"2020-01-05T17:41:45.000Z","dependencies_parsed_at":"2024-02-01T05:01:34.064Z","dependency_job_id":null,"html_url":"https://github.com/codemk8/apihub","commit_stats":null,"previous_names":["codemk8/apihub"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codemk8/apihub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemk8%2Fapihub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemk8%2Fapihub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemk8%2Fapihub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemk8%2Fapihub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemk8","download_url":"https://codeload.github.com/codemk8/apihub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemk8%2Fapihub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28512905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: 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":["api","caas","gateway","kong","kubernetes","microservices"],"created_at":"2026-01-17T17:28:33.485Z","updated_at":"2026-01-17T17:28:33.563Z","avatar_url":"https://github.com/codemk8.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apihub\n\n**Deploy APIs Made Easy**\n\n## Objectives\n\n**apihub** is a thin layer on top of kubernetes cluster to expose and manage Restful-style microservices for external usage. It's major(or small) contribution is to easily add a restful API service to a API gateway ([kong](https://getkong.org) for now). Its usages include:\n\n1. Build a small CAAS (Container-as-a-service) infrastructure\n1. Set up a local microservice API testbed for CI\n1. Save money for using only one TLS certficates (;-)); for all microservices are under the same URL (Kong proxy).\n1. more ...\n\n![compare](./docs/compare.png)\n\n## Features\n\n**apihub** features: \n\n* A mordern Go CLI interface ([cobra](https://github.com/spf13/cobra/)) to wrap the raw kong API calls\n* Made it easy to take advantage of Kong's various plugins (authorization, rate limit) for Restful APIs.\n\n## Setups\n\nWe assume you already have:\n* A running kubernetes cluster\n* [Tiller](https://github.com/kubernetes/helm) is running as a service and local host has helm installed (TODO remove this requirement)\n* A bunch of restful docker images that you would like to serve, in an organized way\n\n## Development\n\n```bash\n# Make sure you have go tool\ncd $GOPATH/src\nmkdir -p github.com/codemk8/\ncd github.com/codemk8/\ngit clone https://github.com/codemk8/apihub.git\ncd apihub\nmake\n# It'll generate a bin/ap binary\n```\n## Walkthrough\n\n```bash\ncd $GOPATH/src/github.com/codemk8/apihub\nmake\n# Firstly do a quick check to see if prerequisites are satisfied\n$ ./bin/ap check  \n2018/03/13 00:08:33 Found 19 pods in the cluster, checking OK.\nNAME            REVISION        UPDATED                         STATUS          CHART           NAMESPACE\napihub-kong     1               Mon Mar 12 00:49:31 2018        DEPLOYED        kong-0.1.2      default\n\nNAME    URL\nstable  https://kubernetes-charts.storage.googleapis.com\nlocal   http://127.0.0.1:8879/charts\n# Then init the system, including persistent volumes (not fully supported yet), kong service\n$ ./bin/ap init\n...\n# Deploy a clusterIP service in the kubernetes as you normally do with kubectl. Following example use echoserver:\n$ kubectl create -f docs/manual/echoserver/echoserver.yaml\n$ kubectl get services \nNAME                       TYPE    CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE\napihub-kong-kong-admin  NodePort  172.30.250.49    \u003cnone\u003e    8444:32444/TCP  23h\napihub-kong-kong-proxy  NodePort  172.30.109.2     \u003cnone\u003e    8443:32443/TCP  23h\napihub-kong-postgresql  ClusterIP 172.30.220.61    \u003cnone\u003e    5432/TCP        23h\nhttp-echoserver         ClusterIP 172.30.110.244   \u003cnone\u003e    80/TCP          11d\n\n# Ready to deploy, run 'ap deploy -h' for detailed usage\n$ ./bin/ap deploy http-echoserver --name=my_echo --uris=echo/v1\n2018/03/13 00:21:45 Successfully executed Deploy command.\n\n# test the echoserver, note to use the Kong proxy's NodePort, \n# Replace localhost with your real kubernetes host\n$ curl -k http://localhost:32443/echo/v1\n...\n\n# (Optional) Remove an exposed API\n$ ./bin/ap remove my_echo\n\n# list APIs \n$ ./bin/ap list\n+---------+---------------------------+----------+----------+\n| NAME    |        UPSTREAMURL        | STRIPURI | URIS     |\n+---------+---------------------------+----------+----------+\n| my_echo | http://http-echoserver:80 | true     | /echo/v1 |\n+---------+---------------------------+----------+----------+\n|                                        TOTAL   |   1      |\n+---------+---------------------------+----------+----------+\n\n```\n\n## TO DO\n\n* More sophisticated API management including version, tagging.\n* Improve usability, add Kong plugin support.\n* Expose more features of Kong API.\n* Try other API gateways, or just use native [Ingress in Kubernetes](https://kubernetes.io/docs/concepts/services-networking/ingress/)\n* Test in medium-scaled clusters.\n* Make the tool itself a Restful API service so that fancier web UI can be built as a frontend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemk8%2Fapihub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemk8%2Fapihub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemk8%2Fapihub/lists"}