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.5.1
adminConsolePort: "30245"
adminConsolePortSSL: "31749"
exposedFeatures:
- xdcr
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.5.1 3 Running 91f7b67a0aa6a2e2b0ecefb63528194a 56m
These fields are provided for convenience when looking up and configuring clusters and map to status variables as follows:
- VERSION
- SIZE
- STATUS
- UUID
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
orFailed
.
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 beTrue
when the cluster is available, andFalse
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 beTrue
when all pods have been balanced in to the cluster, andFalse
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.
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
orFalse
.
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.adminConsolePort (DEPRECATED)
The NodePort
that is listening for connection to the Couchbase web console.
Use port-forwarding to connect to the console, or service lookup to derive the correct connection string.
Field rules: This field will be a string.
status.adminConsolePortSSL (DEPRECATED)
The NodePort
that is listening for connection to the Couchbase web console.
Use port-forwarding to connect to the console, or service lookup to derive the correct connection string.
Field rules: This field will be a string.
status.exposedFeatures[]
The set of exposed features currently associated with per-node services.
Field rules: This field will be a list of strings, and either
admin
,xdcr
orclient
.
status.buckets[]
The set of buckets currently managed on the cluster.
Field rules: This field will be a list of objects describing Couchbase buckets.