{"id":26151629,"url":"https://github.com/manikupireddii/kubernode","last_synced_at":"2025-03-11T06:38:09.684Z","repository":{"id":264313308,"uuid":"893010265","full_name":"manikupireddii/kubernode","owner":"manikupireddii","description":"Kubernetes tools for node js ","archived":false,"fork":false,"pushed_at":"2024-11-23T10:02:20.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T16:39:47.464Z","etag":null,"topics":["devops","k8s","k8s-deployment","kubernetes","kubernetes-operator","kubernetes-setup","nodejs"],"latest_commit_sha":null,"homepage":"","language":null,"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/manikupireddii.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":"2024-11-23T09:46:07.000Z","updated_at":"2024-12-09T06:35:51.000Z","dependencies_parsed_at":"2024-11-25T10:15:41.245Z","dependency_job_id":null,"html_url":"https://github.com/manikupireddii/kubernode","commit_stats":null,"previous_names":["pawannnnn/kubernode","pawvan/kubernode","manikupireddii/kubernode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manikupireddii%2Fkubernode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manikupireddii%2Fkubernode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manikupireddii%2Fkubernode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manikupireddii%2Fkubernode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manikupireddii","download_url":"https://codeload.github.com/manikupireddii/kubernode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242987692,"owners_count":20217533,"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":["devops","k8s","k8s-deployment","kubernetes","kubernetes-operator","kubernetes-setup","nodejs"],"created_at":"2025-03-11T06:38:08.713Z","updated_at":"2025-03-11T06:38:09.664Z","avatar_url":"https://github.com/manikupireddii.png","language":null,"readme":"# kubenode\n\nKubenode is a set of modules and tools for working with Kubernetes in Node.js.\n\n## Quick start guide\n\nThis section demonstrates the process of creating a new Kubernetes Custom\nResource Definition (CRD) and corresponding controller using the Kubenode CLI.\n\nInitialize a new Kubenode project using the following command. This command will\ncreate a number of files and directories in the current directory.\n\n```sh\nmkdir /tmp/kubenode\ncd /tmp/kubenode\nnpx kubenode init -p library-project -d library.io\n```\n\nCreate scaffolding for a new `Book` resource type using the following command.\nThis will create several more files and directories containing controller code,\ntypes, and a sample resource that can be applied to your Kubernetes cluster\nlater. It will also update the existing code to run the new controller.\n\n**Note**: The generated controller is an empty skeleton that runs, but does not\ndo anything. For the purposes of this guide, it may be helpful to add\n`console.log(req)` to the generated `reconcile()` function.\n\n```sh\nnpx kubenode add api -g library.io -v v1 -k Book\n```\n\nGenerate a CRD from the types created in the previous step using the following\n`codegen` command:\n\n```sh\nnpx kubenode codegen -g library.io -v v1 -k Book\n```\n\nAdd a validating webhook for the new `Book` type via the following command:\n\n```sh\nnpx kubenode add webhook -g library.io -v v1 -k Book -a\n```\n\n### Build and deploy\n\nThe generated resources need to be built into an image and pushed to a registry.\nIn order to do this, the image needs a name. The resources are scaffolded with\nan image reference of `controller:latest`. You will need to decide on an image\nname of your own. The following command configures the project to use an image\nreference of `localhost:5000/controller`. You should substitute your own image\nreference instead.\n\n```sh\nnpx kubenode configure manager-image localhost:5000/controller\n```\n\nBuild the image and push it to the registry using the following command:\n\n```sh\nnpm run docker-build\nnpm run docker-push\n```\n\nDeploy the generated system using the following command:\n\n```sh\nnpm run deploy\n```\n\nAt this point, you can create a new instance of your CRD by applying the\ngenerated sample to the cluster using the following command:\n\n```sh\nkubectl apply -f config/samples/library.io_v1_book.yaml\n```\n\nIf you added a `console.log()` to your controller it should be executed once the\nsample resource is created. You can view the logs via the following command:\n\n```sh\nkubectl logs -n kubenode deployment/controller-manager -f\n```\n\n### Cleanup\n\nThe system can be torn down using the following command:\n\n```sh\nnpm run undeploy\n```\n\n## CLI commands\n\n### `kubenode add api`\n\nGenerates resources for a new CRD.\n\nFlags:\n\n- `-g`, `--group` (string) - The API group of the CRD. **Required**.\n- `-k`, `--kind` (string) - The Kind of the CRD. **Required**.\n- `-v`, `--version` (string) - The API version of the CRD. **Required**.\n- `-w`, `--directory` (string) - The working directory for the command.\n  **Default:** `process.cwd()`.\n\n### `kubenode add webhook`\n\nGenerates resources for validating and mutating webhooks.\n\nFlags:\n\n- `-a`, `--validating` - If present, a validating webhook is scaffolded.\n  **Default:** A validating webhook is not created.\n- `-g`, `--group` (string) - The API group of the CRD. **Required**.\n- `-k`, `--kind` (string) - The Kind of the CRD. **Required**.\n- `-m`, `--mutating` - If present, a mutating webhook is scaffolded.\n  **Default:** A mutating webhook is not created.\n- `-v`, `--version` (string) - The API version of the CRD. **Required**.\n- `-w`, `--directory` (string) - The working directory for the command.\n  **Default:** `process.cwd()`.\n\n### `kubenode codegen`\n\nGenerates configuration files for a CRD that was previously created via the\n`kubenode add api` command.\n\nFlags:\n\n- `-g`, `--group` (string) - The API group of the CRD. **Required**.\n- `-k`, `--kind` (string) - The Kind of the CRD. **Required**.\n- `-v`, `--version` (string) - The API version of the CRD. **Required**.\n- `-w`, `--directory` (string) - The working directory for the command.\n  **Default:** `process.cwd()`.\n\n### `kubenode configure manager-image IMAGE_REFERENCE`\n\nSets the project's image reference to be `IMAGE_REFERENCE`.\n\nFlags:\n\n- `-w`, `--directory` (string) - The working directory for the command.\n  **Default:** `process.cwd()`.\n\n### `kubenode init`\n\nInitializes a new project.\n\nFlags:\n\n- `-d`, `--domain` (string) - Domain for CRDs in the project. **Required**.\n- `-p`, `--project-name` (string) - The project name. **Default:** The name of\n  the current directory.\n- `-w`, `--directory` (string) - The working directory for the command.\n  **Default:** `process.cwd()`.\n\n## Available packages\n\n- `kubenode` or `@kubenode/kubenode` - The top level module that should be\ninstalled and used. `kubenode` and `@kubenode/kubenode` can be used\ninterchangeably.\n- `@kubenode/cli` - Implementation of the `kubenode` CLI commands.\n- `@kubenode/controller-runtime` - APIs used to implement Kubernetes\ncontrollers.\n- `@kubenode/crdgen` - APIs for generating CRDs from TypeScript.\n- `@kubenode/reference` - Utilities for working with container image references.\n\n## Future goals\n\n- Continue adding missing functionality to the existing APIs.\n- Controller client generation.\n- Tools for building Kubernetes API extension servers.\n\n## Acknowledgment\n\nThis project was heavily inspired by [Kubebuilder](https://book.kubebuilder.io/)\nand its subprojects such as [`controller-runtime`](https://github.com/kubernetes-sigs/controller-runtime). Some of the code here has been adapted from\nthose projects.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanikupireddii%2Fkubernode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanikupireddii%2Fkubernode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanikupireddii%2Fkubernode/lists"}