{"id":14384196,"url":"https://github.com/mr-karan/kubekutr","last_synced_at":"2025-08-23T16:32:15.508Z","repository":{"id":40614195,"uuid":"192550690","full_name":"mr-karan/kubekutr","owner":"mr-karan","description":"Cookie cutter templating tool for scaffolding K8s manifests","archived":true,"fork":false,"pushed_at":"2021-07-19T13:42:33.000Z","size":665,"stargazers_count":159,"open_issues_count":2,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-19T09:27:47.887Z","etag":null,"topics":["gitops","kubernetes","kustomize"],"latest_commit_sha":null,"homepage":"","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/mr-karan.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}},"created_at":"2019-06-18T13:56:57.000Z","updated_at":"2025-06-01T08:53:33.000Z","dependencies_parsed_at":"2022-08-27T00:21:59.298Z","dependency_job_id":null,"html_url":"https://github.com/mr-karan/kubekutr","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mr-karan/kubekutr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fkubekutr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fkubekutr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fkubekutr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fkubekutr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mr-karan","download_url":"https://codeload.github.com/mr-karan/kubekutr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fkubekutr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271755685,"owners_count":24815459,"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-08-23T02:00:09.327Z","response_time":69,"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":["gitops","kubernetes","kustomize"],"created_at":"2024-08-28T18:01:11.843Z","updated_at":"2025-08-23T16:32:15.144Z","avatar_url":"https://github.com/mr-karan.png","language":"Go","funding_links":[],"categories":["Go","Diagnostics \u0026 Troubleshooting"],"sub_categories":[],"readme":"\u003ca href=\"https://zerodha.tech\"\u003e\u003cimg src=\"https://zerodha.tech/static/images/github-badge.svg\" align=\"right\" /\u003e\u003c/a\u003e\n\n# kubekutr\n\n\u003cimg src=\"logo.png\" alt=\"drawing\" width=\"400\"/\u003e\n\n🍪✂️ _Cookie cutter for Kubernetes resource manifests_\n\n(_Pronounced as \"cube cutter\"_)\n\n`kubekutr` lets you quickly scaffold a [bespoke](https://kubernetes-sigs.github.io/kustomize/api-reference/glossary/#bespoke-configuration) configuration for Kubernetes resource manifests with an _opinionated_ GitOps directory structure. `kubekutr` is ideally meant to be used in combination with [kustomize](https://github.com/kubernetes-sigs/kustomize).\n\n![Overview image](docs/overview.png)\n\n## Motivation\n\n`kustomize` is a great tool when it comes to declarative application management for manifests. There still exists a lot of manual scaffolding to create a [base](https://kubernetes-sigs.github.io/kustomize/api-reference/glossary/#base) which defines your application state. `kubekutr` aims to solve the issue of writing these manifests manually by providing a very simple Go template rendering engine.\n\nRead the blog [post](https://mrkaran.dev/posts/introducing-kubekutr/) for more information.\n\n### Non Goals\n\n`kubekutr` doesn't aim to provide all 1000s of options of templating `yaml` files. More users mean every user will want to customise the `yaml` in some way or the other and this is where `kustomize` comes into picture. Users of `kubekutr` are encourage to use `kustomize` to create _variants_ on top of `bases` to apply any kind of customisation. `kubekutr`'s **only** goal is to create the _base_ directory.\n\n## Installation\n\n### Using snap\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/kubekutr)\n\n```sh\n$ sudo snap install kubekutr\n```\n\n### Grab the latest binary\n\n```shell\n$ cd \"$(mktemp -d)\"\n$ curl -sL \"https://github.com/mr-karan/kubekutr/releases/download/0.8.2/kubekutr_0.8.2_$(uname)_amd64.tar.gz\" | tar xz\n$ mv kubekutr /usr/local/bin\n# kubekutr should be available now in your $PATH\n$ kubekutr --version\n```\n\n## Usage\n\n```shell\nNAME:\n   kubekutr - Cookie cutter for Kubernetes resource manifests\n\nUSAGE:\n   kubekutr [global options] command [command options] [arguments...]\n\nVERSION:\n   4175090 (2020-02-06 18:03:26 +0530)\n\nAUTHOR:\n   Karan Sharma @mrkaran\n\nCOMMANDS:\n   scaffold, s  Scaffold a new project with gitops structure\n   init, i      Initialize a new project. Initializes git repo and a sample config file.\n   help, h      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --verbose                 Enable verbose logging\n   --config value, -c value  path to one or more config files\n   --help, -h                show help\n   --version, -v             print the version\n```\n\n### Initialise a new project\n\n- **Using Prompt**\n\n`kubekutr init`\n\n[![asciicast](https://asciinema.org/a/303176.png)](https://asciinema.org/a/303176)\n\n- **Using default config**\n\n`kubekutr init --default`\n\nEither of these options create a config file `kubekutr.yml` in your current working directory. You can edit this file further to suit your needs and scaffold a project using this.\n\n- **Define output file**\n\n`kubekutr init -o \u003cfilename.yml\u003e`\n\nOverride the default config filename.\n\n### Scaffold a new project\n\n```bash\n# create a new base\n\n$ kubekutr --config kubekutr.yml scaffold -o myproject\n\n# `myproject` is created with the GitOps structure\nmyproject\n`-- base\n    |-- app\n    |   |-- app-deployment.yml\n    |   |-- app-ingress.yml\n    |   |-- app-service.yml\n    |-- second-app\n        |-- db-statefulset.yml\n```\n\n#### Generate kustomization.yml\n\nIf you'd like to generate a super simple, default `kustomization.yml` in `base` folder at the time of scaffolding, you can specify `--kustomize` or `-k` with `scaffold`:\n\n```sh\nkubekutr --config kubekutr.yml scaffold -o myproject -k\n```\n\n```yml\nresources:\n  - app/app-service.yml\n  - app/app-deployment.yml\n  - app/app-service.yml\n  - app/app-ingress.yml\n  - second-app/db-statefulset.yml\n```\n\n## Configuration\n\nYou can see a sample configuration file [here](templates/config.sample.yml).\n\n- **workloads**\n    -   **name**: Name of the workload. A workload represents the complete set of resources required to deploy an application\n    -   **deployments**\n        -   **name**: Name of the deployment\n        -   **replicas**: Represents the number of replicas for a `Pod`\n        -   **labels**:\n            - **name**: Represent the key value pair as a string. For eg: `\"app.kubernetes.io/tier: cache\"`\n        -   **containers**: List of containers in a Pod\n            - **name**: Unique name for a container\n            - **image**: Docker image name\n            -   **ports**:\n                - **name**: Unique identifier for the port.\n                - **port**: Port address/name for port exposed on container.\n                - **createService**: (_False/True_): Automatically create a `Service` manifest based on the port settings of container.\n            - **command**: Entrypoint array\n            - **args**: Arguments to the entrypoint\n            - **envVars**: List of environment variables to set in the container\n                - **name**: Name of environment variable\n                - **value**: Value of environment variable\n            - **volumeMounts**: Pod volumes to mount into the container's filesystem\n                - **name**: Name of Volume\n                - **mountPath**: Path within the container at which the volume should be mounted\n                - **subPath**: Path within the volume from which the container's volume should be mounted.\n        -   **volumes**: List of volumes defined for a deployment\n                - **name**: Name of Volume\n\n    -   **statefulsets**\n        -   **name**: Name of the statefulset\n        -   **serviceName**: serviceName is the name of the service that governs this StatefulSet\n        -   **labels**: (reference above)\n        -   **containers**: (reference above)\n        -   **volumes**:(reference above)\n\n    -   **services**\n        -   **name**: Name of service\n        -   **type**: Type of service. Can be one of `ClusterIP`, `NodePort`, `LoadBalancer`\n        -   **ports**:\n            - **name**: Unique identifier for the port.\n            - **port**: Port address/name for port exposed on container.\n            - **targetPort**: Number or name of the port to access on the pods targeted by the service\n            - **protocol**: Defaults to TCP. (Can be either _TCP/UDP_)\n        -   **labels**: (reference above)\n        -   **selectors**:\n            - **name**:  Route service traffic to pods with label keys and values matching this selector\n\n    -   **ingresses**\n        -   **name**: Name of ingress\n        -   **ingressPaths**\n            -   **path**: Path which map requests to backends\n            -   **service**: Specifies the name of the referenced service\n            -   **port**: Specifies the port of the referenced service\n        -   **labels**: (reference above)\n        -   **annotations**:\n            - **name**:  Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata\n\n## ⭐️ Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributing\n\nThis is still an alpha release. For a full list of things to improve, see unchecked items in [TODO](TODO.md).\nContributions welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fkubekutr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-karan%2Fkubekutr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fkubekutr/lists"}