Overview of the TimesTen Kubernetes Operator and the TimesTen Exporter
The TimesTen Operator supports the TimesTen exporter and lets you configure TimesTenClassic and TimesTenScaleout objects to use this TimesTen exporter. Once configured, the TimesTen Operator starts, stops, and manages the TimesTen exporter. As the TimesTen exporter collects metrics from the TimesTen databases running in your Kubernetes environment, the TimesTen Operator works to expose these metrics to Prometheus.
The TimesTen exporter runs in its own exporter
container. This container exists in the same TimesTen Pods as the tt
and the daemonlog
containers. These TimesTen Pods run in your Kubernetes cluster.
The TimesTen Operator creates the Pods that are running TimesTen with the Kubernetes shareProcessNamespace
Pod attribute. This attribute allows the TimesTen exporter that is running in the exporter
container to access TimesTen that is running in the tt
container, both of which are in the TimesTen Pod. For more information about the shareProcessNamespace
attribute, see Share Process Namespace between Containers in a Pod in the Kubernetes documentation.
The TimesTen Operator configures the exporter
container with the same TimesTen container image as the tt
and the daemonlog
containers. If the TimesTen exporter fails or exits, Kubernetes destroys the exporter
container and creates another one to take its place. Kubernetes monitors and manages the exporter
container. Because the lifecycle of individual containers in a Pod are independent, the TimesTen Operator ensures that the ttExporter
command starts after TimesTen. The TimesTen Operator waits until the TimesTen agent creates the TimesTen instance and waits until the TimesTen main daemon is running in the tt
container of the TimesTen Pod. The Operator then starts the TimesTen exporter in the exporter
container of the same TimesTen Pod.
Once configured, the TimesTen exporter functions as an http or https server. It listens for incoming GET requests and responds to them by gathering a set of metrics from TimesTen. It then returns these metrics as the response to the GET request.
To facilitate the listening process, the TimesTen Operator creates a Kubernetes headless Service. This Service exposes the port on which the TimesTen exporter is listening to the remainder of the Kubernetes cluster. This lets a Prometheus server running in the cluster to fetch the TimesTen metrics from TimesTen and process them.