[](https://badge.fury.io/js/cdk-kubesphere)
[](https://badge.fury.io/py/cdk-kubesphere)

# cdk-kubesphere
**cdk-kubesphere** is a CDK construct library that allows you to create [KubeSphere](https://kubesphere.io/) on AWS with CDK in TypeScript, JavaScript or Python.
# Sample
```python
import { KubeSphere } from 'cdk-kubesphere';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'cdk-kubesphere-demo');
// deploy a default KubeSphere service on a new Amazon EKS cluster
new KubeSphere(stack, 'KubeSphere');
```
Behind the scene, the `KubeSphere` construct creates a default Amazon EKS cluster and `KubeSphere` serivce with helm chart([ks-installer](https://github.com/kubesphere/ks-installer)) on it.
<details>
<summary>View helm command</summary>
AWS CDK will helm install the `ks-installer` on the cluster:
```sh
helm install ks-installer \
--repo https://charts.kubesphere.io/test \
--namespace=kubesphere-system \
--generate-name \
--create-namespace
```
</details>
## KubeSphere App Store
Use `appStore` to enable the [KubeSphere App Store](https://kubesphere.io/docs/pluggable-components/app-store/) support.
```python
new KubeSphere(stack, 'KubeSphere', {
appStore: true,
});
```
<details>
<summary>View helm command</summary>
AWS CDK will helm install the `ks-installer` on the cluster:
```sh
helm install ks-installer \
--set openpitrix.enabled=true \
--repo https://charts.kubesphere.io/test \
--namespace=kubesphere-system \
--generate-name \
--create-namespace
```
</details>
# Using existing Amazon EKS clusters
You are allowed to deploy `KubeSphere` in any existing Amazon EKS cluster.
```python
const cluster = eks.Cluster.fromClusterAttributes(this, 'MyCluster', {
clusterName: 'my-cluster-name',
kubectlRoleArn: 'arn:aws:iam::1111111:role/iam-role-that-has-masters-access',
});
// deploy a default KubeSphere service on the existing Amazon EKS cluster
new KubeSphere(stack, 'KubeSphere', { cluster });
```
See [Using existing clusters](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-eks#using-existing-clusters) to learn how to import existing cluster in AWS CDK.
# Console
Run the following command to create a `port-forward` from localhost:8888 to `ks-console:80`
```sh
kubectl -n kubesphere-system port-forward service/ks-console 8888:80
```
Open `http://localhost:8888` and enter the default username/password(`admin/P@88w0rd`) to enter the admin console.
Raw data
{
"_id": null,
"home_page": "https://github.com/pahud/cdk-kubesphere.git",
"name": "cdk-kubesphere",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Pahud Hsieh<pahudnet@gmail.com>",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/51/c7/40ea3408685b25f79a705ac2b582b7b667e579eec734369154a6a8d338d4/cdk-kubesphere-2.0.314.tar.gz",
"platform": null,
"description": "[](https://badge.fury.io/js/cdk-kubesphere)\n[](https://badge.fury.io/py/cdk-kubesphere)\n\n\n# cdk-kubesphere\n\n**cdk-kubesphere** is a CDK construct library that allows you to create [KubeSphere](https://kubesphere.io/) on AWS with CDK in TypeScript, JavaScript or Python.\n\n# Sample\n\n```python\nimport { KubeSphere } from 'cdk-kubesphere';\n\nconst app = new cdk.App();\n\nconst stack = new cdk.Stack(app, 'cdk-kubesphere-demo');\n\n// deploy a default KubeSphere service on a new Amazon EKS cluster\nnew KubeSphere(stack, 'KubeSphere');\n```\n\nBehind the scene, the `KubeSphere` construct creates a default Amazon EKS cluster and `KubeSphere` serivce with helm chart([ks-installer](https://github.com/kubesphere/ks-installer)) on it.\n\n<details>\n<summary>View helm command</summary>\nAWS CDK will helm install the `ks-installer` on the cluster:\n\n```sh\nhelm install ks-installer \\\n--repo https://charts.kubesphere.io/test \\\n--namespace=kubesphere-system \\\n--generate-name \\\n--create-namespace\n```\n\n</details>\n\n## KubeSphere App Store\n\nUse `appStore` to enable the [KubeSphere App Store](https://kubesphere.io/docs/pluggable-components/app-store/) support.\n\n```python\nnew KubeSphere(stack, 'KubeSphere', {\n appStore: true,\n});\n```\n\n<details>\n<summary>View helm command</summary>\nAWS CDK will helm install the `ks-installer` on the cluster:\n\n```sh\nhelm install ks-installer \\\n--set openpitrix.enabled=true \\\n--repo https://charts.kubesphere.io/test \\\n--namespace=kubesphere-system \\\n--generate-name \\\n--create-namespace\n```\n\n</details>\n\n# Using existing Amazon EKS clusters\n\nYou are allowed to deploy `KubeSphere` in any existing Amazon EKS cluster.\n\n```python\nconst cluster = eks.Cluster.fromClusterAttributes(this, 'MyCluster', {\n clusterName: 'my-cluster-name',\n kubectlRoleArn: 'arn:aws:iam::1111111:role/iam-role-that-has-masters-access',\n});\n\n// deploy a default KubeSphere service on the existing Amazon EKS cluster\nnew KubeSphere(stack, 'KubeSphere', { cluster });\n```\n\nSee [Using existing clusters](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-eks#using-existing-clusters) to learn how to import existing cluster in AWS CDK.\n\n# Console\n\nRun the following command to create a `port-forward` from localhost:8888 to `ks-console:80`\n\n```sh\nkubectl -n kubesphere-system port-forward service/ks-console 8888:80\n```\n\nOpen `http://localhost:8888` and enter the default username/password(`admin/P@88w0rd`) to enter the admin console.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "CDK construct library to deploy KubeSphere on AWS",
"version": "2.0.314",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e8b521a09cd72c852e17789330345ecca83fe89146aae92bbe0c2c9fb63767a4",
"md5": "4fdf908dbefc0e3ab5a3831e80a2eba2",
"sha256": "bfbbe4a3f001696fd9a2285b053047907a30b5b1631e4154b393ec76fe7324b5"
},
"downloads": -1,
"filename": "cdk_kubesphere-2.0.314-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4fdf908dbefc0e3ab5a3831e80a2eba2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 30098,
"upload_time": "2023-03-20T00:13:09",
"upload_time_iso_8601": "2023-03-20T00:13:09.456239Z",
"url": "https://files.pythonhosted.org/packages/e8/b5/21a09cd72c852e17789330345ecca83fe89146aae92bbe0c2c9fb63767a4/cdk_kubesphere-2.0.314-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "51c740ea3408685b25f79a705ac2b582b7b667e579eec734369154a6a8d338d4",
"md5": "c7846c1018d288e5ceb9253cc8470528",
"sha256": "11b8f5aa86e102da5d5a91bd6c00228ef95a3058cf1f87dadc426c49cd4f531a"
},
"downloads": -1,
"filename": "cdk-kubesphere-2.0.314.tar.gz",
"has_sig": false,
"md5_digest": "c7846c1018d288e5ceb9253cc8470528",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 31626,
"upload_time": "2023-03-20T00:13:11",
"upload_time_iso_8601": "2023-03-20T00:13:11.853827Z",
"url": "https://files.pythonhosted.org/packages/51/c7/40ea3408685b25f79a705ac2b582b7b667e579eec734369154a6a8d338d4/cdk-kubesphere-2.0.314.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-20 00:13:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "pahud",
"github_project": "cdk-kubesphere.git",
"lcname": "cdk-kubesphere"
}