Getting Started with Helm Charts (Scalar Manager)
Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to:
- Check the availability of ScalarDB or ScalarDL.
- Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL.
- Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards.
For more details, refer to Scalar Manager Overview.
This guide will show you how to deploy and access Scalar Manager on a Kubernetes cluster.
Assumption
This guide assumes that you are aware of how to deploy ScalarDB or ScalarDL with the monitoring and logging tools to a Kubernetes cluster.
Requirement
- You need privileges to pull the Scalar Manager container (
scalar-manager) from GitHub Packages. - You must create a Github Personal Access Token (PAT) with
read:packagesscope according to the GitHub document to pull the above container. - You must deploy
kube-prometheus-stackaccording to the instructions in Getting Started with Helm Charts (Monitoring using Prometheus Operator). - You must deploy
loki-stackaccording to the instructions in Getting Started with Helm Charts (Logging using Loki Stack).
What we create
We will deploy the following components on a Kubernetes cluster as follows.
+--------------------------------------------------------------------------------------------------+
| +----------------------+ |
| | scalar-manager | |
| | | |
| | +------------------+ | --------------------------(Manage)--------------------------+ |
| | | Scalar Manager | | | |
| | +------------------+ | | |
| +--+-------------------+ | |
| | | |
| +------------------------------------+ | |
| | loki-stack | V |
| | | +-----------------+ |
| | +--------------+ +--------------+ | <----------------(Log)--------------- | Scalar Products | |
| | | Loki | | Promtail | | | | |
| | +--------------+ +--------------+ | | +-----------+ | |
| +------------------------------------+ | | ScalarDB | | |
| | | +-----------+ | |
| +------------------------------------------------------+ | | |
| | kube-prometheus-stack | | +-----------+ | |
| | | | | ScalarDL | | |
| | +--------------+ +--------------+ +--------------+ | -----(Monitor)----> | +-----------+ | |
| | | Prometheus | | Alertmanager | | Grafana | | +-----------------+ |
| | +-------+------+ +------+-------+ +------+-------+ | |
| | | | | | |
| | +----------------+-----------------+ | |
| | | | |
| +--------------------------+---------------------------+ |
| | | |
| | | Kubernetes |
+----+-----------------------+---------------------------------------------------------------------+
| |
expose to localhost (127.0.0.1) or use load balancer etc to access
| |
(Access Dashboard through HTTP)
| |
+----+----+ +----+----+
| Browser | <-(Embed)-- + Browser |
+---------+ +---------+
Step 1. Upgrade the kube-prometheus-stack to allow Grafana to be embedded
-
Add or revise this value to the custom values file (e.g. scalar-prometheus-custom-values.yaml) of the
kube-prometheus-stackkubeStateMetrics:
enabled: true
nodeExporter:
enabled: true
kubelet:
enabled: true
grafana:
grafana.ini:
users:
default_theme: light
security:
allow_embedding: true
auth.anonymous:
enabled: true
org_name: "Main Org."
org_role: Editor -
Upgrade the Helm installation
helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml
Step 2. Prepare a custom values file for Scalar Manager
-
Create an empty .yaml file named
scalar-manager-custom-values.yamlforscalar-manager. -
Set the service type to access Scalar Manager. The default value is
ClusterIP, but if we access using theminikube tunnelcommand or some load balancer, we can set it asLoadBalancer.service:
type: LoadBalancer
port: 8000
Step 3. Deploy scalar-manager
- Deploy the
scalar-managerHelm Chart.helm install scalar-manager scalar-labs/scalar-manager -f scalar-manager-custom-values.yaml
Step 4. Access Scalar Manager
If you use minikube
-
To expose Scalar Manager's service resource as your
localhost (127.0.0.1), open another terminal, and run theminikube tunnelcommand.minikube tunnel -
Open the browser with URL
http://localhost:8000
If you use other Kubernetes than minikube
If you're using a Kubernetes cluster other than minikube, you'll need to access the LoadBalancer service according to the manner of each Kubernetes cluster. For example, you'll need to use a load balancer provided by your cloud services provider or use the kubectl port-forward command.
Scalar Manager will try to detect the external IP of Grafana and then embed Grafana based on the IP. Therefore, you must configure the Grafana service type as LoadBalancer, and the external IP must be accessible from your browser.
Step 5. Delete Scalar Manager
- Uninstall
scalar-managerhelm uninstall scalar-manager