---
# System prepended metadata

title: Install KSE v4.1 Online

---

# Install KSE v4.1 Online
### os support
#### k8s version supported by kubekey
1. Check which versions of k8s can be installed by kk
```
./kk version --show-supported-k8s
```
2. Install the specified k8s version.(default v1.23.15)
you can change k8s version in configuration file. at field `spec.kubernetes.version`
If you haven't create a k8s cluster yet, you can create the k8s by `./kk create cluster` command.
If you have created a k8s cluster by kubekey yet, you also can change k8s version by `./kk upgrade` command. refer: https://github.com/kubesphere/kubekey/wiki/Upgrade-Kubernetes-cluster-from-v1.23-to-v1.24-or-later

#### k8s version supported by kse
kse4.1 support k8s version v1.21~v1.28. 
details extensions list like this:


| Extension | Extension version | support kubernetes version| support cpu arch |
| -------- | -------- | -------- | -------- |
| ks-core     | 4.1.x     | 1.21~1.28     | amd64,arm64     |
| DevOps     | 1.1.0     | 1.21~1.28     | amd64,arm64     |
| Storage-utils     | 1.0.x     | 1.21~1.28     | amd64,arm64     |
| Vector     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| OpenSearch     | 2.11.1     | 1.21~1.28     | amd64,arm64     |
| Monitoring     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| Logging     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| Auditing     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| Events     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| Alerting     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| WhizardTelemetry     | 1.0.0     | 1.21~1.28     | amd64,arm64     |
| Notification     | 2.5.1     | 1.21~1.28     | amd64,arm64     |
| MetricServer     | 0.7.0     | 1.21~1.28     | amd64,arm64     |
| Tower     | 1.0.x     | 1.21~1.28     | amd64,arm64     |
| OpenPitrix     | 2.0.0     | 1.21~1.28     | amd64,arm64     |
| KubeFed     | 1.0.x     | 1.21~1.28     | amd64,arm64     |
| Gateway     | 1.0.x     | 1.22~1.25     | amd64,arm64     |
| ServiceMesh     | 1.0.x     | 1.22~1.25     | amd64,arm64     |
| KubeEdge     | 1.31.1     | 1.21~1.23     | amd64,arm64     |
| RadonDB DMP     | 2.1.0     | 1.21~1.28     | amd64     |
| SpringCloud     | 1.0.x     | 1.21~1.28     | amd64,arm64     |
| Gatekeeper     | 1.0.x     | 1.21~1.28     | amd64,arm64     |
| Network     | 1.0.x     | 1.21~1.28     | amd64,arm64     |

#### Enable GPU Monitoring
**you can use the kse extension `Monitoring` to enable GPU Monitoring**

GPU monitoring requires the installation of GPU drivers and configuring CRI on the nodes, as well as deploying the corresponding device-plugin in the cluster; or you can use gpu-operator to create, configure, and manage GPUs on Kubernetes.

Note: The WhizardTelemetry Monitoring includes a built-in dcgm-exporter (not enabled by default) that enhances the default GPU monitoring metrics and functionalities. This exporter is similar to the dcgm-exporter deployed by the gpu-operator. You only need to enable one of them (to avoid conflict) to export GPU monitoring metrics.

If you have deployed dcgm-exporter with gpu-operator, after completing the deployment of WhizardTelemetry monitoring, please use helm to update or redeploy [gpu-operator] and add the --set dcgmExporter.serviceMonitor.enabled=true parameter. Do not enable the built-in dcgm-exporter to avoid conflicts.

If you are using the built-in dcgm-exporter on top of the gpu-operator deployment, please use helm to update or redeploy gpu-operator and add the --set dcgmExporter.enabled=false parameter. Set the dcgmExporter.enabled configuration in the extension components to true to enable the built-in installation.

Modify the Extension Config and set whizard-monitoring-helper.enabledGPUMonitoring.enabled and dcgmExporter.enabled to true. Save and update the configuration, then start the installation.

```
whizard-monitoring-helper:
  gpuMonitoringHelper:
    enabled: false

dcgmExporter:
  enabled: false
```

### Install k8s cluster by kubekey
1. Download KubeKey
```
curl -sSL https://get-kk.kubesphere.io | sh -
```
2. Generate KubeKey configuration file
```
./kk create config
```
3. According to the environmental information, fill in the configuration file. For more configurations, please refer to: https://github.com/kubesphere/kubekey/blob/master/docs/config-example.md
4. Create cluster
> `--with-local-storage` indicates that openebs (local-storage) is used as the cluster persistent storage. If you need to dock other persistent storage, please refer to: https://kubesphere.io/docs/v3.3/installing-on-linux/persistent-storage-configurations/understand-persistent-storage/
```
./kk create cluster -f config-sample.yaml --with-local-storage
```
### Deploy KSE v4.1
#### v4.1.2
```
# ks-core
chart=oci://hub.kubesphere.com.cn/kse/ks-core
helm upgrade --install -n kubesphere-system --create-namespace ks-core $chart --version 1.1.0 --debug --wait 

# extension publish
helm template -n kubesphere-system oci://hub.kubesphere.com.cn/kse/kse-extensions-publish --version v10.2.0 --set museum.enabled=true | kubectl apply -f - 
```

#### v4.1.3
```
chart=oci://hub.kubesphere.com.cn/kse/ks-core
helm upgrade --install -n kubesphere-system --create-namespace ks-core $chart --version 1.1.1 --debug --wait 
```

> KSE v4.1 has been installed successfully, and you can login to Web Console of KSE to fill in the license and enable extensions.


# Install KSE v4.1.0 Offline
### Download offline package
```
wget https://kubesphere-installer.pek3b.qingstor.com/offline/kse-v4.1.0-offline-linux-amd64-all-20240515.tar.gz
```
### Configure the Installation Configuration File
`config-sample.yaml` is the installation configuration file of KubeSphere Enterprise. Please configure this file first.
According to the environmental information, fill in the configuration file. For more configurations, please refer to: https://github.com/kubesphere/kubekey/blob/master/docs/config-example.md
### Install Image Registry (Optional)
If there is already a available image registry, you can skip this part.
1. Set the information of the server used to create the private image registry under the `spec:hosts`

2. Set the server name for creating a private image registry under the spec:roleGroups:registry parameter (replace `<registry name>` with the actual name of the server set under the `spec:hosts` parameter).
    
3. Set the `spec:registry:privateRegistry` parameter to the default address of the private image registry `dockerhub.kubekey.local/kse`, and save the file.
    ```
       spec:
         hosts:
         ...
         - {name: registry, address: 192.168.0.6, internalAddress: 192.168.0.6, user: ubuntu, password: Testing123}
         ...
         roleGroups:
           ...
           registry:
           - <registry name>

         registry:
           ...
           privateRegistry: dockerhub.kubekey.local/kse
    ```
4. Execute the following command to initialize the private image registry.
    ```
    ./kk init registry -f config-sample.yaml -a kubekey-artifact.tar.gz
    ```
    
5. If the `spec:registry:type` parameter is set to harbor, execute the following command to create Harbor projects.    
    ```
    bash create_project_harbor.sh
    ```
    After creating the Harbor project, configure the `spec:registry:auths` parameter in `config-sample.yaml`.
    ```
    spec:
      ...
      registry:
        ...
        auths:
          "dockerhub.kubekey.local":
            username: admin
            password: Harbor12345
    ```
    
### Install k8s cluster
> 1. If you already have an existing Kubernetes cluster, you can skip this step.
> 2. The installation package includes dependencies for CentOS 7, Ubuntu 18.04, Ubuntu 20.04, and Ubuntu 22.04. If you are using one of these operating systems, you can use KK to automatically install the system dependencies by adding the `--with-packages` option to the installation command. If you are using a different operating system or encounter dependency issues, you will need to manually install the required dependencies (e.g. socat, conntrack).
> 3. If you want to use OpenEBS LocalPV, you can add the `--with-local-storage` parameter after the following command. If you want to integrate with other storage solutions, configure the relevant storage plugins under the spec:addons parameter in `config-sample.yaml` or install them after the Kubernetes deployment.
> 4. If you are using Harbor deployed by kk, make sure to create the Harbor project and configure the `spec:registry:auths` parameter in the `config-sample.yaml` file before installing Kubernetes.
    
Execute the following command to create the Kubernetes cluster:
```
./kk create cluster -f config-sample.yaml -a kubekey-artifact.tar.gz
```

### Install KubeSphere Enterprise

> Notice: Before deploying KSE, make sure that all images of KSE have been pushed to the registry to be used.

1. deploy ks-core
```
# Notice: Replace the image registry url in the command with the url of registry to be used.

helm upgrade --install -n kubesphere-system --create-namespace ks-core charts/ks-core \
     --debug \
     --wait \
     --set upgrade.enabled=false,cloud.enabled=false \
     --set global.imageRegistry=dockerhub.kubekey.local/kse,extension.imageRegistry=dockerhub.kubekey.local/kse
```

2. publish extensions
```
# Notice: Replace the image registry url in the command with the url of registry to be used.

helm template -n kubesphere-system charts/kse-extensions-publish \
     --set museum.enabled=true \
     --set global.imageRegistry=dockerhub.kubekey.local/kse | kubectl apply -f -
```
> KSE v4.1.0 has been installed successfully, and you can login to Web Console of KSE to fill in the license and enable extensions.
