Operators add new Custom Resources to a Kubernetes cluster.
Existing observability tools are inadequate to discover & track Custom Resources and their dependencies.
KubePlus is a generic tool that enables inventory and charge-back for extended Kubernetes clusters. It uses a unique method of relationship tags defined on Kubernetes Operator packages (CRDs) to track Kubernetes Custom Resources and their relationships. The tags unlock KubePlus's ability to provide accurate discovery and monitoring for entire Resource set available on the cluster through a set of kubectl plugins.
Platform stacks are realized by establishing relationships between available Kubernetes Resources (built-in or Custom). These relationships are primarily of four types.
-> (1) Owner references – A resource internally creates additional resources (e.g. MysqlCluster when instantiated, creates Pods and Services). These sub-resources are related to the parent resource through Owner reference relationship.
-> (2) Labels and (3) Annotations – Labels or Annotations are key/value pairs that are attached to Kubernetes resources. Resource A can depend on a specific label or annotation to be given on Resource B to take some action.
-> (4) Spec Properties – Resource A’s Spec property may depend on a value coming from Resource B.
# kubectl connections
Custom Resource aware resource topologies
Aggregate metrics for platform stacks
# kubectl grouplogs
Aggregate logs for platform stacks
Here is a sample workload on a cluster of two wordpress stacks. Wordpress pods depend on MySqlCluster Custom Resources.
Here is a visual representation of the complete resource relationship graph for one of the platform stacks.
This resource inventory and their inter-relationships can be discovered using following KubePlus kubectl commands:
# kubectl connections Service wordpress
# kubectl connections cr MysqlCluster cluster1
#kubectl metrics cr MysqlCluster cluster1
#kubectl metrics service wordpress
#kubectl metrics account <Service account>