{"id":14483559,"url":"https://github.com/cah4a/rekube","last_synced_at":"2025-10-08T03:46:34.581Z","repository":{"id":174600960,"uuid":"649041519","full_name":"cah4a/rekube","owner":"cah4a","description":"React renderer for Kubernetes configurations","archived":false,"fork":false,"pushed_at":"2024-03-11T07:52:03.000Z","size":893,"stargazers_count":24,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T16:14:14.815Z","etag":null,"topics":["kubernetes","kubernetes-deployment","react","react-renderer","reactjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cah4a.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":"2023-06-03T15:33:30.000Z","updated_at":"2025-07-12T17:17:41.000Z","dependencies_parsed_at":"2024-02-25T09:32:49.953Z","dependency_job_id":"d4d52b96-55e4-4eb5-806b-77d4a1ad9960","html_url":"https://github.com/cah4a/rekube","commit_stats":null,"previous_names":["cah4a/rekube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cah4a/rekube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cah4a%2Frekube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cah4a%2Frekube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cah4a%2Frekube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cah4a%2Frekube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cah4a","download_url":"https://codeload.github.com/cah4a/rekube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cah4a%2Frekube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278886408,"owners_count":26062975,"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-10-08T02:00:06.501Z","response_time":56,"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":["kubernetes","kubernetes-deployment","react","react-renderer","reactjs"],"created_at":"2024-09-03T00:01:51.791Z","updated_at":"2025-10-08T03:46:34.566Z","avatar_url":"https://github.com/cah4a.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# RE:KUBE PROJECT\n\nReact renderer for Kubernetes configurations.  \nJSX instead of clumsy YAML, declarative and type-safe configurations.\n\n## Why Rekube?\n\n1. **Leverage programming:**  \n   Use variables, functions, type-safety, conditional rendering, etc.\n\n2. **Leverage React:**  \n   Context aware configurations, Reusable components, Package ecosystem\n\n## Before you start\n\nInstall [node](https://nodejs.org/en/download) if you don't have it already.\n\nAs option, install one of the following package managers:\n- [yarn](https://yarnpkg.com/getting-started/install)\n- [pnpm](https://pnpm.io/installation)\n\n## Getting started\n\n1. Init the project\n\n   ```bash\n   mkdir /your/project\n   cd /your/project\n   npm init # You could use pnpm or yarn if you prefer\n   ```\n\n2. Add Rekube base components package to the project:\n   \n   ```bash\n   npm install -D rekube @rekube/base\n   ```\n   \n   or\n   ```bash\n   pnpm install -D rekube @rekube/base\n   yarn add -D rekube @rekube/base\n   ```\n\n3. Create a file `k8s.tsx` with the following content:\n\n   ```tsx\n   import { Deployment } from \"@rekube/base/apps/v1\";\n   import { Container, ContainerPort, PodTemplateSpec, Service, ServicePort } from \"@rekube/base/core/v1\";\n   \n   export default function App() {\n       const labels = { app: \"nginx\" };\n   \n       return (\n           \u003c\u003e\n               \u003cDeployment\n                   meta:name=\"nginx\"\n                   replicas={3}\n                   selector={{ matchLabels: labels }}\n               \u003e\n                   \u003cPodTemplateSpec meta:labels={labels}\u003e\n                       \u003cContainer name=\"nginx\" image=\"nginx:1.14.2\"\u003e\n                           \u003cContainerPort containerPort={80} /\u003e\n                       \u003c/Container\u003e\n                   \u003c/PodTemplateSpec\u003e\n               \u003c/Deployment\u003e\n   \n               \u003cService meta:name=\"nginx-svc\" selector={{ labels }}\u003e\n                   \u003cServicePort port={80} targetPort={80} protocol=\"TCP\" /\u003e\n               \u003c/Service\u003e\n           \u003c/\u003e\n       );\n   }\n   ```\n\n4. Run `rekube` cli in the project directory.\n\n   It will render the k8s.tsx file to stdout:\n   ```bash\n   npx rekube\n   npx rekube ./other/file.tsx\n   npx rekube \u003e k8s.yaml\n   ```\n   \n   or pipe it directly to kubectl:\n   ```bash\n   npx rekube | kubectl apply -f -\n   ```\n\n## Publishing your Rekube packages on npm\n\nRekube utilizes the npm ecosystem.  \nYou can publish your Rekube components just like [any other npm package](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages).  \nMoreover, Rebuke includes a built-in transpiler that enables you to directly publish `tsx/jsx` files.\n\n## Generating Rekube Components out of yaml file\n\nRekube includes a built-in transpiler that enables you to directly convert `yaml` files to `tsx` files.\n\n```bash\nnpx rekube convert ./path/to/your/file.yaml\n```\n\n## Contributing\n\nAny contribution is welcome. Either it's a bug report, a feature request, or a pull request.\nReach me out if you have any questions or need help with anything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcah4a%2Frekube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcah4a%2Frekube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcah4a%2Frekube/lists"}