{"id":17491791,"url":"https://github.com/in-fun/kubescript","last_synced_at":"2025-04-22T20:15:08.580Z","repository":{"id":63720449,"uuid":"568159427","full_name":"in-fun/KubeScript","owner":"in-fun","description":"Kubernetes meets Typescript","archived":false,"fork":false,"pushed_at":"2023-02-14T05:01:57.000Z","size":17747,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-22T20:15:03.965Z","etag":null,"topics":["deno","gitops","infrastructure-as-code","kubernetes","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/in-fun.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":"2022-11-19T16:29:34.000Z","updated_at":"2024-12-18T15:57:36.000Z","dependencies_parsed_at":"2023-02-15T17:15:58.621Z","dependency_job_id":null,"html_url":"https://github.com/in-fun/KubeScript","commit_stats":{"total_commits":38,"total_committers":4,"mean_commits":9.5,"dds":0.3421052631578947,"last_synced_commit":"90277b1be23dea4efbcb23dc608b996bcd1df9a3"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-fun%2FKubeScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-fun%2FKubeScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-fun%2FKubeScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/in-fun%2FKubeScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/in-fun","download_url":"https://codeload.github.com/in-fun/KubeScript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316066,"owners_count":21410476,"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":["deno","gitops","infrastructure-as-code","kubernetes","typescript"],"created_at":"2024-10-19T08:05:05.655Z","updated_at":"2025-04-22T20:15:08.559Z","avatar_url":"https://github.com/in-fun.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"256\" alt=\"cover\" src=\"doc/image/cover_photo.png\"/\u003e\n\n**`KubeScript` is a DRY _infrastructure as code_ solution to Kubernetes DevOps**\n\n\u003cimg width=\"400\" alt=\"demo\" src=\"doc/image/service.ts.png\"/\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n\u003chr/\u003e\n\n### Status\n\n**Beta**\n\n### Features\n\n- [No yaml files](https://noyaml.com/).\n- No boilerplate or hack.\n- Type based code completion with Typescript.\n- Safe sandbox with Deno.\n\nhttps://user-images.githubusercontent.com/705652/211314587-d5ed7bb2-3e28-4afe-960f-c0b26e0fd7a4.mov\n\n## Quickstart\n\n### Prerequisites\n\n1. Install deno by following\n   [the official guide](https://deno.land/manual@v1.28.1/getting_started/installation).\n2. Install `KubeScript` by running the following command.\n\n   ```bash\n   deno install --unstable -A --root /usr/local -n ks https://deno.land/x/kube_script/main.ts\n   ```\n\n### Quick demo\n\nYou can try `KubeScript` without writing any code.\n\n```bash\nks https://deno.land/x/kube_script/example/web/mod.ts\n```\n\n### A full example\n\n1. Checkout this project.\n   ```bash\n   git clone https://github.com/in-fun/KubeScript.git\n   ```\n\n1. Generate k8s yaml files.\n\n   ```bash\n   ks example/nginx\n   ```\n1. Show diff from current settings.\n\n   ```bash\n   ks example/nginx --env production | kubectl diff -f -\n   ```\n1. Apply k8s resources.\n\n   ```bash\n   ks example/nginx --env production | kubectl apply -f -\n   ```\n\n## FAQ\n\n1. Kubernetes resource manifests are declarative, why adding a scripting layer?\n\n   I agree declarative style is preferable, if the problem domain is not\n   complex. But when things goes to some level of complexity, all so called\n   declarative solution turns out to be procedural or requires procedural style\n   hacks. I will give an example to illustrate it below.\n\n   This is a\n   [helm manifest](https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/argocd-server/deployment.yaml)\n   for argocd-server deployment. As we can see, it uses procedural style\n   statements including for loop (range), and if-else branching. The end result\n   is mixing 2 languages in one: yaml and mustache; so it's even more\n   complicated than a scripting language.\n\n   Our opinion is that real-world kubernetes manifests are so complex, that a\n   fully declarative style of writing is almost impossible. On the other hand,\n   procedural style is more flexible, easier to maintain, thus better.\n\n1. Why use deno instead of node.js?\n\n   Deno is more developer friendly than node.js. For example, deno resolves\n   dependencies on the fly, so no `npm install` any more.\n\n1. How does KubeScript compare to other solutions?\n\n   We have summarized that in [this doc](doc/comparison.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-fun%2Fkubescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fin-fun%2Fkubescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-fun%2Fkubescript/lists"}