{"id":18293116,"url":"https://github.com/kubesphere/ksbuilder","last_synced_at":"2025-07-06T21:10:08.523Z","repository":{"id":49366311,"uuid":"517489973","full_name":"kubesphere/ksbuilder","owner":"kubesphere","description":"A CLI tool helps you to manage the development of kubesphere extensions","archived":false,"fork":false,"pushed_at":"2025-05-30T02:31:24.000Z","size":453,"stargazers_count":12,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-20T22:29:36.803Z","etag":null,"topics":[],"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/kubesphere.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,"zenodo":null}},"created_at":"2022-07-25T02:20:33.000Z","updated_at":"2025-05-30T02:31:28.000Z","dependencies_parsed_at":"2023-01-22T01:45:54.649Z","dependency_job_id":"8dac36bd-370d-4bd0-9198-83a51ac7297b","html_url":"https://github.com/kubesphere/ksbuilder","commit_stats":{"total_commits":105,"total_committers":18,"mean_commits":5.833333333333333,"dds":0.6190476190476191,"last_synced_commit":"dc3bf617832fee321e32fb0a69e91f2576abdd58"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/kubesphere/ksbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fksbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fksbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fksbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fksbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubesphere","download_url":"https://codeload.github.com/kubesphere/ksbuilder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fksbuilder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262652771,"owners_count":23343334,"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":[],"created_at":"2024-11-05T14:22:10.198Z","updated_at":"2025-07-06T21:10:08.508Z","avatar_url":"https://github.com/kubesphere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nksbuilder is a CLI tool to create, publish, and manage KubeSphere extensions.\n\n## Install\n\nDownload the [latest ksbuilder release](https://github.com/kubesphere/ksbuilder/releases) and then install it to `/usr/local/bin`:\n```shell\ntar xvzf ksbuilder_\u003cversion\u003e_\u003carch\u003e.tar.gz -C /usr/local/bin/\n```\n\n## Create your first KubeSphere extension\n\nYou can use `ksbuilder create` to create a KubeSphere extension interactively.\n\n```\n$ cd \u003cproject-directory\u003e\n$ ksbuilder create\n\nPlease input extension name: test\n✔ ai-machine-learning\nPlease input extension author: ia\nPlease input Email (optional):\nPlease input author's URL (optional):\nDirectory: /path/test\n\nThe extension charts has been created.\n```\n\nThe extension directory created looks like below:\n\n```\n.\n├── README.md\n├── README_zh.md\n├── applicationclass.yaml\n├── charts\n│   ├── backend\n│   │   ├── Chart.yaml\n│   │   ├── templates\n│   │   │   ├── NOTES.txt\n│   │   │   ├── deployment.yaml\n│   │   │   ├── extensions.yaml\n│   │   │   ├── helps.tpl\n│   │   │   ├── service.yaml\n│   │   │   └── tests\n│   │   │       └── test-connection.yaml\n│   │   └── values.yaml\n│   └── frontend\n│       ├── Chart.yaml\n│       ├── templates\n│       │   ├── NOTES.txt\n│       │   ├── deployment.yaml\n│       │   ├── extensions.yaml\n│       │   ├── helps.tpl\n│       │   ├── service.yaml\n│       │   └── tests\n│       │       └── test-connection.yaml\n│       └── values.yaml\n├── extension.yaml\n├── permissions.yaml\n├── static\n│   ├── favicon.svg\n│   └── screenshots\n│       └── screenshot.png\n└── values.yaml\n```\n\nThen you can customize your extension like below:\n\n- Specify the default backend and frontend images\n\n```\nfrontend:\n  enabled: true\n  image:\nrepository:  \u003cYOUR_REPO\u003e/\u003cextension-name\u003e\n    tag: latest\n\nbackend:\n  enabled: true\n  image:\n    repository: \u003cYOUR_REPO\u003e/\u003cextension-name\u003e\n    tag: latest\n```\n\n- Add `APIService` definition to the backend `extensions.yaml`\n\n```yaml\napiVersion: extensions.kubesphere.io/v1alpha1\nkind: APIService\nmetadata:\n  name: v1alpha1.\u003cextension-name\u003e.kubesphere.io\nspec:\n  group: \u003cextension-name\u003e.kubesphere.io\n  version: v1alpha1                                      \n  url: http://\u003cextension-name\u003e-backend.default.svc:8080\nstatus:\n  state: Available\n```\n\n- Add `JSBundle` definition to the frontend `extensions.yaml`\n\n```yaml\napiVersion: extensions.kubesphere.io/v1alpha1\nkind: JSBundle\nmetadata:\n  name: v1alpha1.\u003cextension-name\u003e.kubesphere.io\nspec:\n  rawFrom:\n    url: http://\u003cextension-name\u003e-frontend.default.svc/dist/\u003cextension-name\u003e-frontend/index.js\nstatus:\n  state: Available\n  link: /dist/\u003cextension-name\u003e-frontend/index.js\n```\n\n## Publish/Unpublish your KubeSphere extension\n\nYou can publish/unpublish KubeSphere extension to KubeSphere cluster once it's ready:\n\n```shell\nksbuilder publish/unpublish \u003cextension-name\u003e\n```\n\n## Push and submit your extension to KubeSphere Cloud\n\n### Create API access token\n\n1. Register an account on [KubeSphere Cloud](https://kubesphere.cloud).\n2. Open [KubeSphere Marketplace](https://kubesphere.co/marketplace/), click on \"Become a service provider,\" sign the agreement, and become an extension service provider (i.e., developer).\n3. Open [https://kubesphere.cloud/user/setting/](https://kubesphere.cloud/user/setting/), click on \"Security,\" then click \"Create Token,\" check \"Extension Component,\" and click \"Generate.\" The generated token is the cloud API key, formatted like `kck-xxx`. Please keep it safe.\n\n### Login to KubeSphere Cloud\n\nUse the `ksbuilder login` subcommand to login to KubeSphere Cloud:\n\n```\n$ ksbuilder login\n✔ Enter API token: ***\n\nLogin Succeeded\n```\n\nor:\n\n```\n$ ksbuilder login -t xxx\n\nLogin Succeeded\n```\n\n### Push and submit the extension\n\nUse the `ksbuilder push` subcommand to submit the extension to KubeSphere Cloud. The `push` subcommand is similar to `publish` and the target can be either a directory or a packaged `.tgz` file:\n\n```\n$ ksbuilder push tower\n\n$ ksbuilder push tower-1.0.0.tgz\n```\n\n\u003e NOTE: We will upload static files such as icons and screenshots in the extension to the KubeSphere Cloud separately\nand delete the static file directory in the original package to reduce the size of the entire chart.\n\n### Check the extension status\n\nAfter submitting the extension, it needs to be approved by an administrator before it can be listed on KubeSphere Marketplace. You can use the `ksbuilder get` or `ksbuilder list` subcommands to check the status of the extension:\n\n```\n$ ksbuilder list\n\nID                   NAME                STATUS              LATEST VERSION\n469804312491467933   devops              ready               1.0.0\n482307830796264605   kubeblocks          ready               0.6.3\n```\n\n```\n$ ksbuilder get tower\n\nName:     tower\nID:       515518094316151974\nStatus:   draft\n\nSNAPSHOT ID          VERSION   STATUS      UPDATE TIME\n515518094316217510   1.0.0     submitted   2024-05-27 09:37:05\n```\n\n### Unpush a snapshot\n\nUse the `ksbuilder unpush` subcommand to cancel the submission of a snapshot in KubeSphere Cloud.\n\nWhen we submit an extension, its snapshot status is marked as `submitted`. If we want to make some new changes to the extension at this point, we can use this command to undo the submission. After undoing, the status of the extension will revert to `draft`, allowing it to be pushed again.\n\nTo undo the submission, we first need to use the `get` subcommand to obtain the corresponding snapshot ID:\n\n```\n$ ksbuilder get tower\nName:     tower\nID:       515518094316151974\nStatus:   draft\n\nSNAPSHOT ID          VERSION   STATUS      UPDATE TIME\n515518094316217510   1.0.0     submitted   2024-05-27 17:37:05 CST\n\n$ ksbuilder unpush 515518094316217510\nunpush snapshot 515518094316217510\nSnapshot 515518094316217510 has been unsubmitted and reverted to draft state\n```\n\nPlease refer to [KubeSphere extension development guide](https://dev-guide.kubesphere.io/extension-dev-guide/en/packaging-and-release/) for more details on extension packaging and releasing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fksbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubesphere%2Fksbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fksbuilder/lists"}