- Choose Cloud Provider: While the article uses Azure as an example, you can use any cloud provider of your choice.
- Install Helm, Azure CLI, and Kubectl: Head to the Helm website and install Helm binary, Azure CLI, and Kubectl binaries on your local machine.
- Verify Installation: Check that the installation was successful by running kubectl, az, and helm commands in your terminal.
- Log in to Azure: Use az login to log in to your Azure account.
- Create Resource Group: Create a resource group with the command az group create -n harperdb-helm.
- Create Kubernetes Cluster: Use az aks create -n harperdb-helm -g harperdb-helm --node-count 1 --generate-ssh-keys to create a Kubernetes cluster.
- Get Cluster Credentials: After cluster creation, run az aks get-credentials -n harperdb-helm -g harperdb-helm --admin to populate your kubeconfig file with cluster credentials.
- Verify Cluster: Check the cluster status by running kubectl get nodes. You should see a list with one node if everything is fine.
- Helm Charts: Helm organizes packages into charts, and they have a specific directory structure.
- Create a Chart: Use helm create harperdb to create a new chart with the necessary files and directories.
- Simplify the Chart Structure: Delete unnecessary files and directories within the chart, keeping only Chart.yaml, templates/, and values.yaml.
- Template Files: Create template files for Kubernetes resources (e.g., deployment, service, and persistent volume claim) within the templates/ directory.
- Apply Template Variables: Use Golang template functions (default, required, quote, and .Values) to apply variables and placeholders to the template files.
- Define Values: Customize the values.yaml file with default values for variables used in the templates.
- Render the Template: Verify the correctness of the templates by rendering them using the command helm template -n <namespace> --set <variable=value> harperdb.
- Install the Chart: If everything is correct, use helm install -n database --set <variable=value> harperdb to deploy the application to the Kubernetes cluster.
- Check and Remove the Release: To check the deployed application, run helm list -n database. To remove the release, use helm delete harperdb -n database.
- Access the Deployed Application: Refer to the previous article for instructions on accessing the deployed application, especially the "Accessing HarperDB" session.