CouchbaseCluster Status

    +
    Status fields attached to CouchbaseCluster resources by the Operator.

    Every CouchbaseCluster resource has a status object. This object is used to communicate non-obvious resources associated with the cluster or domain specific information that would otherwise be unavailable. The provided status information may be helpful in problem determination or configuring other resources that reference the Couchbase cluster.

    Status fields should be considered read only. Any modifications will not affect the cluster and will be reverted by the Operator.

    An example status object may look like the following, with individual attributes explained below:

    apiVersion: couchbase.com/v2
    kind: CouchbaseCluster
    status:
      phase: Running
      reason: ""
      controlPaused: false
      conditions:
      - type: Available
        status: "True"
        reason: Available
        lastUpdateTime: "2020-01-29T11:46:22Z"
        lastTransitionTime: "2020-01-29T11:46:22Z"
      clusterId: "91f7b67a0aa6a2e2b0ecefb63528194a"
      size: 3
      members:
        ready:
        - my-cluster-0000
        unready:
        - my-cluster-0001
        - my-cluster-0002
      currentVersion: 6.6.0
      allocations:
      - name: data
        allocatedMemory: 3Gi
        allocatedMemoryPercent: 66
        unusedMemory: 1Gi
        unusedMemoryPercent: 33
        dataServiceAllocation: 256Mi
        indexServiceAllocation: 256Mi
        searchServiceAllocation: 256Mi
        eventingServiceAllocation: 256Mi
        analyticsServiceAllocation: 1Gi
      buckets:
        - compressionMode: passive
          conflictResolution: seqno
          enableFlush: false
          enableIndexReplica: false
          evictionPolicy: valueOnly
          ioPriority: low
          memoryQuota: 100
          name: default
          password: ""
          replicas: 1
          type: couchbase
      users:
      - david
      - matthew
      groups:
      - readonly

    The CouchbaseCluster custom resource definition defines custom formatting that is used by the following command:

    $ kubectl get couchbaseclusters
    NAME         VERSION   SIZE   STATUS    UUID                               AGE
    cb-example   6.6.0     3      Running   91f7b67a0aa6a2e2b0ecefb63528194a   56m

    These fields are provided for convenience when looking up and configuring clusters and map to status variables as follows:

    status

    This section defines and describes individual status fields.

    status.phase

    The phase of cluster life-cycle the Operator is in.

    When the CouchbaseCluster is first created, the Operator will transition into the Creating phase. Cluster creation involves creating the first pod in the cluster and configuring it. If the Operator is restarted while any cluster is in the Creating phase, it will be considered Failed and will need to be recreated.

    If the creation operation succeeds, the Operator will transition into the Running phase and remain here for the lifetime of the cluster. The Operator may transition into the Failed state if it is unable to restart correctly.

    If the creation operation fails, the Operator will transition into the Failed phase and ignore the cluster. The status.reason attribute will be populated with a detailed error message.

    Field rules: This field will be a string, and either Creating, Running or Failed.

    status.reason

    The reason for a cluster creation failure.

    This field is only populated by the Operator when the status.phase field is set to Failed. It gives a detailed reason why the Operator has declared the cluster Failed.

    Field rules: This field will be a string.

    status.controlPaused

    Whether the Operator has acknowledged the cluster is paused.

    This field is used for synchronization of external processes. It will be present and set to true when the Operator has finished processing previous operations, acknowledged that spec.paused is set to true and will not perform any more operations on the cluster.

    The Operator will perform normal reconciliation operations when this field is not present,

    Field rules: This field will be a boolean.

    status.conditions[]

    Conditions are arbitrary domain-specific statuses that can be used to synchronize external processes.

    Conditions are understood by kubectl and may be used to delay operations until a condition exists. For example:

    $ kubectl wait --for=condition=Available couchbasecluster/my-cluster

    You can wait for the presence of any condition defined in status.conditions[].type.

    status.conditions[].type

    What type of condition this relates to.

    Available

    This condition is created when the Operator successfully creates the cluster. It persists for the lifetime of the cluster. The status.conditions[].status field will be True when the cluster is available, and False when any pods are reported as down.

    Balanced

    This condition is created when the Operator has successfully initialized the first pod in the cluster, It persists for the lifetime of the cluster. The status.conditions[].status field will be True when all pods have been balanced in to the cluster, and False when nodes are awaiting addition or being restored.

    ManageConfig

    This condition exists when cluster configuration updates have been rejected by Couchbase server.

    Scaling

    This condition exists when a cluster is scaling up or down.

    Upgrading

    This condition exists when a cluster is upgrading.

    Hibernating

    This condition exists when a cluster is hibernating.

    Field rules: This field will be a string.

    status.conditions[].status

    Whether the condition is True or False.

    Field rules: This field will be a string, and either True or False.

    status.conditions[].reason

    A detailed reason for the condition.

    Field rules: This field will be a string.

    status.conditions[].lastUpdateTime

    When the condition was last updated.

    Field rules: This field will be a string and conform to RFC-3339

    status.conditions[].lastTransitionTime

    When the condition last transitioned from one status.conditions[].status to another.

    Field rules: This field will be a string and conform to RFC-3339

    status.clusterId

    The Couchbase cluster ID.

    This is a unique identifier generated during cluster initialization. This is required to establish XDCR replications to this cluster.

    Field rules: This field will be a string.

    status.size

    The current size of the cluster.

    This number includes all pods that are managed by the Operator regardless of their Couchbase status.

    Field rules: This field will be an integer.

    status.members.ready[]

    The set of pods that are managed by the Operator and serving client traffic.

    Field rules: This field will be a list of strings.

    status.members.unready[]

    The set of pods that are managed by the Operator and not serving client traffic.

    Field rules: This field will be a list of strings.

    status.currentVersion

    The current version of Couchbase server being run.

    This field reflects the cluster version only when all pods are running the same version. When a cluster is upgraded it will remain at the initial cluster version until all pods have been upgraded.

    Field rules: This field will be a string.

    status.allocations[]

    This field displays memory allocation summaries for each class of server defined in spec.servers.

    Field rules: This field will be an array of objects.

    status.allocations[].name

    This field refers to the server class name as defined by spec.servers\[].name.

    Field rules: This field will be a string.

    status.allocations[].allocatedMemory

    This field is the total memory allocated for the Couchbase services enabled for this service class as defined by spec.servers\[].services.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].allocatedMemoryPercent

    This field is optional and is only set when the server class memory request is explicitly defined by spec.servers\[].resources. It is the percentage of memory allocated against the memory requested.

    Field rules: This field will be an integer.

    status.allocations[].unusedMemory

    This field is optional and is only set when the server class memory request is explicitly defined by spec.servers\[].resources. It is the difference between the memory requested and the memory allocated. If this field is negative, then the server class is over-committed and my lead to memory contention and out-of-memory situations.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].unusedMemoryPercent

    This field is optional and is only set when the server class memory request is explicitly defined by spec.servers\[].resources. It is the difference between the memory requested and the memory allocated against the memory requested. If this field is negative, then the server class is over-committed and my lead to memory contention and out-of-memory situations. Couchbase Server requires an overhead, above what is reserved for individual services to function correctly, this value should ideally be at least 25%.

    Field rules: This field will be an integer.

    status.allocations[].dataServiceAllocation

    This field is optional and is only set when the data service is enabled for this server class as defined by spec.servers\[].services. It will be the same as the value defined by spec.cluster.dataServiceMemoryQuota.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].indexServiceAllocation

    This field is optional and is only set when the index service is enabled for this server class as defined by spec.servers\[].services. It will be the same as the value defined by spec.cluster.indexServiceMemoryQuota.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].searchServiceAllocation

    This field is optional and is only set when the full-text search service is enabled for this server class as defined by spec.servers\[].services. It will be the same as the value defined by spec.cluster.searchServiceMemoryQuota.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].eventingServiceAllocation

    This field is optional and is only set when the eventing service is enabled for this server class as defined by spec.servers\[].services. It will be the same as the value defined by spec.cluster.eventingServiceMemoryQuota.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.allocations[].analyticsServiceAllocation

    This field is optional and is only set when the analytics service is enabled for this server class as defined by spec.servers\[].services. It will be the same as the value defined by spec.cluster.analyticsServiceMemoryQuota.

    Field rules: This field will be Kubernetes quantity formatted as a string.

    status.buckets[]

    The set of buckets currently managed on the cluster.

    Field rules: This field will be a list of objects describing Couchbase buckets.

    status.users[]

    The set of users currently managed on the cluster.

    Field rules: This field will be a list of strings.

    status.groups[]

    The set of groups currently managed on the cluster.

    Field rules: This field will be a list of strings.