Skip to main content

Getting Start

About this guide

Goal : Deploy Nocalhost Sever to Kubernetes cluster.
Estimate time : 5 minutes
Requirements :

  • Any local or remote Kubernetes cluster (minikube, Docker Desktop, TKE, GKE, EKS, AKS, Rancher, ...). Allocate at least 4 GB of memory for single node clusters like Docker Desktop and minikube.
  • RBAC must be enabled in above cluster
  • Configured kubeconfig file that has namespace admin privilege
  • kubectl installed
  • Nocalhost IDE Plugin installed
  • Kubernetes api-server can be accessed internal and external
  • Helm installed if you deploy by Helm

You can either deploy Nocalhost Server by Nocalhost CLI tool (nhctl) or by Helm. Either way, you need to have the KubeConfig with namespace admin privilege of the Kubernetes cluster.

Deploy Nocalhost Server by Nocalhost CLI#

1. Initialize by nhctl init#

Run the following command to initialize Nocalhost Server

nhctl init demo -n nocalhost-demo --kubeconfig=<path>/your-kubeconfig-file

-n flag use to specify the namespace that Nocalhost Server will be deployed. In this tutorial, we will deploy Nocalhost Server to namespace nocalhost-demo. If the namespace does not exist, nhctl will create this namespace automatically.

If you do not specify namespace, nhctl will deploy Nocalhost Server to the default namespace.

2. Waiting for Initialization#

Just waiting for the initialization process. You should see the following message after nhctl finished initialization.

Nocalhost Server Deployment

You can now access the Nocalhost Web Service.


nhctl will automatically run port-forward to the Nocalhost Server Web Service after initialization. This is a one-time port-forward.

Deploy Nocalhost Server by Helm#

1. Add the Chart Repository#

helm repo add nocalhost ""

2. Deploy the Nocalhost Server#

helm install nocalhost nocalhost/nocalhost -n nocalhost --create-namespace --kubeconfig=<path>/your-kubeconfig-file

The above deployment will create a pvc for mariadb. If you do not have pvc or without permission to create, you can use the --set mariadb.primary.persistence.enabled=false to deploy Nocalhost Server without creating pvc.

3. Waiting for Deployment#

You can check the deployment status by kubectl or other Kubernetes tools:

> kubectl get pods -n nocalhost-demo --kubeconfig=<path>/your-kubeconfig-file
NAME                            READY   STATUS    RESTARTS   AGEnocalhost-api-8f6dddbb6-rfjvd   0/1     Running   0          13snocalhost-mariadb-0             0/1     Running   0          14snocalhost-web-b46995966-d9hmx   1/1     Running   0          14s

4. Port-Forwarding to Access Web Service#

Once the deployment completed, you need to manually port-forward the Nocalhost Web Service to local by using the following command:

> kubectl port-forward service/nocalhost-web 8080:80 -n demo   
Forwarding from -> 80Forwarding from [::1]:8080 -> 80

You can now access the Nocalhost Web Service.

Access the Web Service#

After deployment, you can access the Nocalhost Server web service via the URL

Nocalhost Server login

Enter the default account information to login to the Nocalhost dashboard

Username and Password to access web service

Email: admin@admin.comPassword: 123456

Deployment Process#

After executing the deployment commands, Nocalhost will:

  1. Deploy essential components: nocalhost-api, nocalhost-mariadb and nocalhost-web
  2. Create another namespace called nocalhost-reserve and deploy nocalhost-dep
  3. Create an namespace with random name, this namespace is used for you initial DevSpace