This topic includes instructions for installing and running HAMi-WebUI on Kubernetes using Helm Charts.
This topic includes instructions for installing and running HAMi-WebUI on Kubernetes using Helm Charts.
The WebUI can only be accessed by your localhost, so you need to connect your localhost to the cluster by configuring `~/.kube/config`
[Helm](https://helm.sh/) is an open-source command line tool used for managing Kubernetes applications. It is a graduate project in the [CNCF Landscape](https://www.cncf.io/projects/helm/).
[Helm](https://helm.sh/) is an open-source command line tool used for managing Kubernetes applications. It is a graduate project in the [CNCF Landscape](https://www.cncf.io/projects/helm/).
The HAMi-WebUI open-source community offers Helm Charts for running it on Kubernetes. Please be aware that the code is provided without any warranties. If you encounter any problems, you can report them to the [Official GitHub repository](https://github.com/hami-webui/helm-charts/).
The HAMi-WebUI open-source community offers Helm Charts for running it on Kubernetes. Please be aware that the code is provided without any warranties. If you encounter any problems, you can report them to the [Official GitHub repository](https://github.com/hami-webui/helm-charts/).
## Before you begin
## Prequisities
To install HAMi-WebUI using Helm, ensure you have completed the following:
- Install a Kubernetes server on your machine. For information about installing Kubernetes, refer to [Install Kubernetes](https://kubernetes.io/docs/setup/).
To install HAMi-WebUI using Helm, ensure you meet these requirements:
- Install the latest stable version of Helm. For information on installing Helm, refer to [Install Helm](https://helm.sh/docs/intro/install/).
1. Kubectl on your localhost
- Install HAMi on your Kubernetes cluster. For information about installing HAMi, refer to [Install HAMi](https://github.com/Project-HAMi/HAMi?tab=readme-ov-file#quick-start).
3. Run the following command to update the repository to download the latest HAMi-WebUI Helm charts:
> _**Important**_: You need to replace the value of 'externalPrometheus.address' to your prometheus address inside cluster
```bash
You can set other fields in [values.yaml](https://github.com/Project-HAMi/HAMi-WebUI/blob/main/charts/hami-webui/values.yaml) during installation according to configuration [document](https://github.com/Project-HAMi/HAMi-WebUI/blob/main/charts/hami-webui/README.md#values)
helm repo update
```
### Deploy the HAMi-WebUI Helm charts
After you have set up the HAMi-WebUI Helm repository, you can start to deploy it on your Kubernetes cluster.
When you deploy HAMi-WebUI Helm charts, use a separate namespace instead of relying on the default namespace. The default namespace might already have other applications running, which can lead to conflicts and other potential issues.
When you create a new namespace in Kubernetes, you can better organize, allocate, and manage cluster resources. For more information, refer to [Namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/).
1. To create a namespace, run the following command:
3. Run the following command to verify the installation:
```bash
```bash
kubectl create namespace hami
kubectl get pods -n kube-system | grep webui
```
```
You will see an output similar to this, which means that the namespace has been successfully created:
You should get the expected both 'hami-webui' and 'hami-webui-dcgm-exporter' in running state if installation is successful.
```bash
namespace/hami created
```
2. Search for the official `hami-webui/hami-webui` repository using the command:
`helm search repo <repo-name/package-name>`
For example, the following command provides a list of the HAMi-WebUI Helm Charts from which you will install the latest version of the HAMi-WebUI chart.
```bash
### Access HAMi-WebUI
helm search repo hami-webui/hami-webui
```
3. Before deploying, ensure that you configure the `values.yaml` file to match your cluster’s requirements. For detailed instructions, refer to the [Configuration Guide for HAMi-WebUI Helm Chart](../../../charts/hami-webui/README.md#configuration-guide-for-hamiwebui-helm-chart)
> _**Important**_: You must adjust the values.yaml before proceeding with the deployment.
Download the `values.yaml` file from the Helm Charts repository:
For more information about port-forwarding, refer to [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/).
For more information about port-forwarding, refer to [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/).