Kubernetes (K8S) operator

CloudHiro's Kubernetes (K8S) operator for monitoring and optimization. Designed to allow attribution of K8S cost and optimize the K8S cluster usage.

The operator is built from scratch to adhere to the most rigorous security requirements, as per our customers' requirements. CloudHiro's K8S operator allows customers to see a breakdown of their cluster costs. If enabled (default to no), the operator optimizes the resource allocation inside the cluster by right-sizing pods. The operator is compatible with all flavors of Kubernetes, including but not limited to EKS, AKS, GKE, and OpenShift.

Installation instructions

  • Go to Advanced->Show External ID. Copy the Initial Token for the account the K8S is running in. You will need it in the next steps. If one does not exist, you can generate one by clicking on the "Regenerate Initial Token" link on the right.
  • Use your externalID to get an API Token for this cluster. This is a REST API call. Here is an example template:
    curl -X POST https://k8s.cloudhiro.com/K8S/K8SCollectData.php?Token=$InitialToken&Type=Token \ -d '{"initial_token":"$InitialToken", "resource_type":"K8S", "resource_id":"$ClusterName"}'
    Please make sure you replace the $InitialToken (twice) and $ClusterName placeholders with the appropriate values. CloudHiro can not pull the cluster name from inside the cluster.
  • Use the API Token to deploy CloudHiro's K8S operator to your cluster.
  • Please make sure you use a new API Token for each cluster.
  • Now you can use the helm installation and configuration parameters sections below to deploy the agent to your cluster.
  • Your data will appear in the visualizer automatically.

Helm installation

helm upgrade -i -n cloudhiro --create-namespace chi-metrics https://cloudhiro.github.io/helm-charts-chi/chi-metrics/chi-metrics-0.3.2.tgz --set exportjob.chToken=$APIToken --set exportjob.memcache_keys="pods\,pod_metrics\,nodes" --set memcached.persistence.enabled=false --set memcached.env.USE_STORAGE=null --set collectordebug.enabled=false

Please make sure you replace the $APIToken above with the API Token you got in the previous step. Please use a different API Token for each cluster.

Configuration parameters

Installation is as simple as deploying a Helm chart. Actually, it is just deploying A Helm chart. Before you do that, you will need an API key, which you can easily get from our console.

Parameter Description Default
logLevel sets the log level INFO
logExecutionTime for debug purposes, sets whether execution time should be logged 0
memcached.persistence.enabled sets persistence to disk for memcache false
memcached.env.USE_STORAGE should be set to null if persistence is false  
exportjob.chToken token to use to communicate with cloudhiro  
exportjob.schedule sets the collector cronjob schedule 0 * * * *
exportjob.historyLimit sets number of collector jobs history to keep 3
exportjob.image.repository the docker repository to get the collector image from  
collectorjob.historyLimit sets number of collector jobs history to keep 3
collectorjob.schedule sets the collector cronjob schedule * * * * *
collectorjob.image.repository the docker repository to get the collector image from  

Your data should appear in your Visualizer dashboards shortly after the installation.

If you need help, we are always here.

 

Redirecting