kasmweb

by szbjb

Helm chartv0.1.0App 1.15.0

A Helm chart for deploying KasmWeb

About this chart

KasmWeb Helm Chart

配置文件说明

该 Helm chart 用于部署 KasmWeb,通过修改 values.yaml 文件中的配置项,你可以定制不同的部署方案。以下是配置文件的详细说明。

快速启动

如果你希望快速启动一个默认配置的 KasmWeb 实例(不启用持久化存储),可以直接使用以下命令:

helm install my-KasmWeb ./

该命令会使用默认的配置,即不启用持久化存储 (PVC),并使用默认的服务和端口设置。

  1. 默认使用 hostPath 持久化存储(storage.usePersistentStorage=true)
helm install test ./ --set storage.usePersistentStorage=true
  1. 使用 StorageClass 和 PVC 持久化存储(storage.usePersistentStorage=true 和 storage.type=StorageClass)
helm install test ./ --set storage.usePersistentStorage=true --set storage.type=StorageClass --set pvc.usePersistentVolumeClaim=true --set pvc.storageClassName=""

配置项表格

配置项描述默认值
replicaCount应用副本数1
image.repositoryDocker 镜像仓库地址swr.cn-southwest-2.myhuaweicloud.com/kubeode/kasmweb/ubuntu-jammy-desktop
image.tagDocker 镜像标签1.15.0
image.pullPolicy镜像拉取策略IfNotPresent
service.type服务类型,支持 ClusterIP, NodePort, LoadBalancer 等NodePort
service.port服务端口6901
service.nodePortNodePort 设置```(自动分配)
service.targetPort目标端口6901
pvc.usePersistentVolumeClaim是否启用持久化存储卷 PVCfalse
pvc.size持久化存储卷 PVC 的大小5Gi
pvc.storageClassNamePVC 存储类名称```
pvc.accessModePVC 访问模式ReadWriteOnce
storage.type存储类型,选择 hostpath 或 StorageClasshostpath
storage.pathhostpath 存储路径/mnt/disks/data/pvc-data
env.VNC_PWVNC 密码Password
env.LANG系统语言设置zh_CN.UTF-8
ingress.enabled是否启用 Ingressfalse
ingress.host域名或主机名example.com
ingress.tls.secretNameTLS 证书的 Secret 名称example-com-tls

选择部署方案

根据不同的需求,你可以通过修改 values.yaml 或在 helm install 时通过 --set 参数来调整部署配置。

1. 启用持久化存储 (PVC)

pvc:
  usePersistentVolumeClaim: true
  size: 10Gi
  storageClassName: "standard"

安装命令:

helm install my-KasmWeb ./ --set pvc.usePersistentVolumeClaim=true --set pvc.size=10Gi --set pvc.storageClassName="standard"

2. 不使用持久化存储 (PVC)

pvc:
  usePersistentVolumeClaim: false

安装命令:

helm install my-KasmWeb ./ --set pvc.usePersistentVolumeClaim=false

3. 启用 Ingress,并配置 TLS 证书

ingress:
  enabled: true
  host: "kasm.example.com"
  tls:
    - hosts:
        - "kasm.example.com"
      secretName: "kasm-tls"

安装命令:

helm install my-KasmWeb ./ --set ingress.enabled=true --set ingress.host="kasm.example.com" --set ingress.tls[0].secretName="kasm-tls"

4. 启用 Ingress,但使用默认的全局证书

ingress:
  enabled: true
  host: "kasm.example.com"
  tls: []  # 不指定 secretName,Ingress Controller 使用默认证书

安装命令:

helm install my-KasmWeb ./ --set ingress.enabled=true --set ingress.host="kasm.example.com"

5. 使用 NodePort 作为服务类型

service:
  type: NodePort
  port: 6901
  nodePort: 30001

安装命令:

helm install my-KasmWeb ./ --set service.type=NodePort --set service.nodePort=30001

6. 使用 LoadBalancer 作为服务类型

service:
  type: LoadBalancer
  port: 6901

安装命令:

helm install my-KasmWeb ./ --set service.type=LoadBalancer

启动和管理

  1. 安装 Chart

    helm install my-KasmWeb ./ --values values.yaml
    
  2. 升级 Chart

    helm upgrade my-KasmWeb ./ --values values.yaml
    
  3. 卸载 Chart

    helm uninstall my-KasmWeb
    

Deploy kasmweb with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kasmweb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkasmweb is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply