You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.

New to KubeDB? Please start here.

Vertical Scale Ignite

This guide will show you how to use KubeDB Ops-manager operator to update the resources of a Ignite database.

Before You Begin

  • At first, you need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one by using kind.

  • Install KubeDB Provisioner and Ops-manager operator in your cluster following the steps here.

  • You should be familiar with the following KubeDB concepts:

To keep everything isolated, we are going to use a separate namespace called demo throughout this tutorial.

$ kubectl create ns demo
namespace/demo created

Note: YAML files used in this tutorial are stored in docs/examples/ignite directory of kubedb/docs repository.

Apply Vertical Scaling

Here, we are going to deploy a Ignite using a supported version by KubeDB operator. Then we are going to apply vertical scaling on it.

Prepare Ignite Database

Now, we are going to deploy a Ignite database with version 2.17.0.

Deploy Ignite

In this section, we are going to deploy a Ignite database. Then, in the next section we will update the resources of the database using IgniteOpsRequest CRD. Below is the YAML of the Ignite CR that we are going to create,

apiVersion: kubedb.com/v1alpha2
kind: Ignite
metadata:
  name: ig
  namespace: demo
spec:
  version: "2.17.0"
  storageType: Durable
  storage:
    storageClassName: "standard"
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 1Gi

Let’s create the Ignite CR we have shown above,

$ kubectl create -f https://github.com/kubedb/docs/raw/v2026.2.21-rc.1/docs/examples/ignite/scaling/ig.yaml
ignite.kubedb.com/ig created

Now, wait until ig has status Ready. i.e,

$ kubectl get ig -n demo
NAME            VERSION    STATUS    AGE
ig   2.17.0      Ready     5m56s

Let’s check the Pod containers resources,

$ kubectl get pod -n demo ig-0 -o json | jq '.spec.containers[].resources'
{
  "limits": {
    "cpu": "500m",
    "memory": "1Gi"
  },
  "requests": {
    "cpu": "500m",
    "memory": "1Gi"
  }
}

You can see the Pod has default resources which is assigned by the KubeDB operator.

We are now ready to apply the IgniteOpsRequest CR to update the resources of this database.

Vertical Scaling

Here, we are going to update the resources of the database to meet the desired resources after scaling.

Create IgniteOpsRequest

In order to update the resources of the database, we have to create a IgniteOpsRequest CR with our desired resources. Below is the YAML of the IgniteOpsRequest CR that we are going to create,

apiVersion: ops.kubedb.com/v1alpha1
kind: IgniteOpsRequest
metadata:
  name: igops-vscale
  namespace: demo
spec:
  type: VerticalScaling
  databaseRef:
    name: ig
  verticalScaling:
    node:
      resources:
        requests:
          memory: "2Gi"
          cpu: "1"
        limits:
          memory: "2Gi"
          cpu: "1"
  timeout: 5m
  apply: IfReady

Here,

  • spec.databaseRef.name specifies that we are performing vertical scaling operation on igps-vscale database.
  • spec.type specifies that we are performing VerticalScaling on our database.
  • spec.VerticalScaling.Node specifies the desired resources after scaling.
  • Have a look here on the respective sections to understand the timeout & apply fields.

Let’s create the IgniteOpsRequest CR we have shown above,

$ kubectl apply -f https://github.com/kubedb/docs/raw/v2026.2.21-rc.1/docs/examples/ignite/scaling/vertical-scaling/igops-vscale.yaml
igniteopsrequest.ops.kubedb.com/igops-vscale created

Verify Ignite resources updated successfully

If everything goes well, KubeDB Ops-manager operator will update the resources of Ignite object and related StatefulSets and Pods.

Let’s wait for IgniteOpsRequest to be Successful. Run the following command to watch IgniteOpsRequest CR,

$ kubectl get igniteopsrequest -n demo
Every 2.0s: kubectl get igniteopsrequest -n demo
NAME                      TYPE              STATUS       AGE
igops-vscale              VerticalScaling   Successful   108s

We can see from the above output that the IgniteOpsRequest has succeeded. If we describe the IgniteOpsRequest we will get an overview of the steps that were followed to scale the database.

$ kubectl describe igniteopsrequest -n demo igops-vscale
Name:         igops-vscale
Namespace:    demo
Labels:       <none>
Annotations:  <none>
API Version:  ops.kubedb.com/v1alpha1
Kind:         IgniteOpsRequest
Metadata:
  Creation Timestamp:  2022-10-26T10:54:01Z
  Generation:          1
  Managed Fields:
    API Version:  ops.kubedb.com/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:apply:
        f:databaseRef:
        f:readinessCriteria:
          .:
          f:objectsCountDiffPercentage:
          f:oplogMaxLagSeconds:
        f:timeout:
        f:type:
        f:verticalScaling:
          .:
          f:node:
            .:
            f:limits:
              .:
              f:cpu:
              f:memory:
            f:requests:
              .:
              f:cpu:
              f:memory:
    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2022-10-26T10:54:01Z
    API Version:  ops.kubedb.com/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:conditions:
        f:observedGeneration:
        f:phase:
    Manager:         kubedb-ops-manager
    Operation:       Update
    Subresource:     status
    Time:            2022-10-26T10:54:52Z
  Resource Version:  613933
  UID:               c3bf9c3d-cf96-49ae-877f-a895e0b1d280
Spec:
  Apply:  IfReady
  Database Ref:
    Name:  ig
  Readiness Criteria:
    Objects Count Diff Percentage:  10
    Oplog Max Lag Seconds:          20
  Timeout:                          5m
  Type:                             VerticalScaling
  Vertical Scaling:
    Node:
      Limits:
        Cpu:     1
        Memory:  2Gi
      Requests:
        Cpu:     1
        Memory:  2Gi
Status:
  Conditions:
    Last Transition Time:  2022-10-26T10:54:21Z
    Message:               Ignite ops request is vertically scaling database
    Observed Generation:   1
    Reason:                VerticalScaling
    Status:                True
    Type:                  VerticalScaling
    Last Transition Time:  2022-10-26T10:54:51Z
    Message:               Successfully Vertically Scaled Resources
    Observed Generation:   1
    Reason:                UpdateResources
    Status:                True
    Type:                  UpdateResources
    Last Transition Time:  2022-10-26T10:54:52Z
    Message:               Successfully Vertically Scaled Database
    Observed Generation:   1
    Reason:                Successful
    Status:                True
    Type:                  Successful
  Observed Generation:     1
  Phase:                   Successful
Events:
  Type    Reason                     Age   From                         Message
  ----    ------                     ----  ----                         -------
  Normal  PauseDatabase              34s   KubeDB Ops-manager Operator  Pausing Ignite demo/ig
  Normal  PauseDatabase              34s   KubeDB Ops-manager Operator  Successfully paused Ignite demo/ig
  Normal  Starting                   34s   KubeDB Ops-manager Operator  Updating Resources of StatefulSet: ig
  Normal  UpdateResources  34s   KubeDB Ops-manager Operator  Successfully updated Resources
  Normal  Starting                   34s   KubeDB Ops-manager Operator  Updating Resources of StatefulSet: ig
  Normal  UpdateResources  34s   KubeDB Ops-manager Operator  Successfully updated Resources
  Normal  UpdateResources  4s    KubeDB Ops-manager Operator  Successfully Vertically Scaled Resources
  Normal  UpdateResources  4s    KubeDB Ops-manager Operator  Successfully Vertically Scaled Resources
  Normal  ResumeDatabase             4s    KubeDB Ops-manager Operator  Resuming Ignite demo/ig
  Normal  ResumeDatabase             3s    KubeDB Ops-manager Operator  Successfully resumed Ignite demo/ig
  Normal  Successful                 3s    KubeDB Ops-manager Operator  Successfully Vertically Scaled Database

Now, we are going to verify from the Pod yaml whether the resources of the database has updated to meet up the desired state, Let’s check,

$ kubectl get pod -n demo ig-0 -o json | jq '.spec.containers[].resources'
{
  "limits": {
    "cpu": "1",
    "memory": "2Gi"
  },
  "requests": {
    "cpu": "1",
    "memory": "2Gi"
  }
}

The above output verifies that we have successfully scaled up the resources of the Ignite database.

Cleaning Up

To clean up the Kubernetes resources created by this tutorial, run:

kubectl delete ig -n demo ig
kubectl delete igniteopsrequest -n demo igops-vscale