How do I perform the k8s/helm setup of YB?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Deploying a YugabyteDB (YB) cluster using Helm in Kubernetes (K8s) offers a robust solution for managing distributed databases on cloud-native infrastructure. This detailed guide will provide step-by-step instructions and key considerations for setting up YugabyteDB using Helm.
Prerequisites
Before getting started, you should have the following components installed and configured:
- Kubernetes Cluster: Ensure you have administrative access to a Kubernetes cluster (version 1.17 or higher recommended). If you don’t have one, you can create a cluster on cloud providers like Google Cloud, AWS, or use local solutions like minikube or kind.
- Helm 3: Helm is a package manager for Kubernetes that simplifies the deployment and management of applications. Install the latest version of Helm 3 from the official Helm releases page.
Step 1: Add the Helm Chart Repository
To start, you need to add the Helm Chart repository that contains YugabyteDB charts. Execute the following command to add the repository:
Step 2: Configure the Helm Chart
Before installing the chart, you can customize the configuration parameters according to your specific needs. You can modify the default settings by editing the values.yaml file of the YugabyteDB chart. For example, you can adjust the resource requests/limits, replica counts, etc.
Fetch the default values.yaml with this command:
Open yugabyte-values.yaml in an editor and modify the parameters.
Step 3: Install YugabyteDB
With the configuration tailored to your environment, you can now install the YugabyteDB chart using the helm install command:
This command installs YugabyteDB in the yb-db namespace (the namespace is created if it doesn’t exist). Replace my-yb-cluster with your preferred release name.
Step 4: Verify the Installation
After the installation, check the status of your YugabyteDB pods by running:
Ensure that all pods are in the RUNNING state. You can also check the services created by Helm for YugabyteDB:
Step 5: Accessing YugabyteDB
To interact with your YugabyteDB cluster, you can use kubectl to forward a port to the YugabyteDB master leader:
Then, you can access the YugabyteDB Admin UI by navigating to http://localhost:7000.
Maintaining and Upgrading
Upgrading: To upgrade your YugabyteDB deployment to a newer version, use the helm upgrade command with the new chart version.
Scaling: To scale your cluster, you can adjust the replicas count in the values.yaml and apply changes:
Backup and Recovery: Regularly back up your YugabyteDB data by leveraging YugabyteDB’s built-in distributed backup capabilities.
Summary Table
Here’s a quick recap of the main steps:
| Step | Action | Command / URL |
| 1 | Add Helm Repo | helm repo add yugabyte https://charts.yugabyte.com |
| 2 | Edit Configuration | Edit yugabyte-values.yaml |
| 3 | Install YugabyteDB | helm install my-yb-cluster yugabyte/yugabyte ... |
| 4 | Check Pods and Services | kubectl get pods/svc -n yb-db |
| 5 | Access YugabyteDB | http://localhost:7000 after port-forward |
Conclusion
Deploying YugabyteDB on Kubernetes using Helm not only simplifies the setup process but also provides scalability, resilience, and manageability. It’s ideal for users seeking to leverage Kubernetes for distributed database systems.
Related reading
- How do I redeploy everything in kubernetes after updating a dockerfile?
- How do I remove the Kubernetes dashboard resources from my deployment on Google Cloud Platform?
- How do I run a container from the command line in Kubernetes like docker run?
- How do I run curl command from within a Kubernetes pod
- How do I put object to amazon s3 using presigned url?
- How do I query by only part of a composite key in DynamoDB?
- How do I run private docker images on Google Container Engine
- How do I save kubectl logs to a file on my host machine?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.