Cluster Provisioning for Container Optimization
In Cloudability Premium, provisioning Kubernetes clusters requires installing two separate agents: the IBM FinOps Agent and the Kubeturbo Agent (Container Optimization Agent).
This page focuses specifically on the installation and configuration of the Kubeturbo (Optimization) Agent — if you need to install the FinOps Agent for cost allocation, please reference the page for Kubernetes Cluster Provisioning.
Deploy the Kubeturbo Agent
Download the Script for the Cloudability Container Optimization (Turbonomic Kubeturbo) Agent
- Navigate to Insights > Containers .
- Select the Provision Clusters button.
- Fill out the form with your cluster name and either your Kubernetes version or your OpenShift version.
- Select Generate Agent Script under the section Container Optimization Agent .
The following steps outline the flow of the installation of the Kubeturbo Agent after the script is downloaded.
Add namespace for the cluster
By default, Kubeturbo deploys to a namespace called turbo. We recommend you keep the default name. However, if you want to specify a custom name during deployment, provide a name that meets the following requirements:
- Should start with lower case alphanumeric characters or the dash symbol (-), and must start and end with an alphanumeric character. For example, my-name and 123-abc are valid names.
-
For a production cluster, consider not using the default namespace.
-
Avoid creating namespaces with the prefix kube-. This is reserved for Kubernetes system namespaces.
Configure the cluster role
You can set the KUBETURBO_ROLE variable to either turbo-cluster-admin or turbo-cluster-reader.
- The turbo-cluster-admin role specifies the minimum permissions Kubeturbo needs to monitor your workloads and execute the optimization actions generated by Turbonomic.
- The turbo-cluster-reader role specifies the minimum permissions Kubeturbo needs to monitor your workloads only. Any optimization actions generated by Turbonomic can only be executed externally (for example, outside the cluster).
For more information, see Cluster roles for Kubeturbo
Configure private image repository
When KUBETURBO_REGISTRY_USRNAME and KUBETURBO_REGISTRY_PASSWRD are provided, the script will use them to create an image pull secret for accessing the private repository and pulling the required images.
KUBETURBO_REGISTRY specifies the prefix of your private registry and repo. It replaces the default icr.io/ cpopen prefix in the original image paths.
- Original prefix: icr.io/ cpopen
- Private registry prefix: myregistry.mycompany.com/kubeturbo
Configure Proxy and registry credentials
Provide the PROXY_SERVER and KUBETURBO_REGISTRY_PASSWRD as base64-encoded strings.
Specify the following proxy settings:
- Proxy hostname or IP address: Specify the address of the proxy used for this target.
- Proxy port: Specify the port to use with the proxy used for this target. By default, the port is 8080.
- Proxy username: Specify the username to use with the proxy.
- Proxy password: Specify the password to use with the proxy.
- Connect using HTTPS: Select this option if Turbonomic will connect to the proxy through HTTPS.
Installation Steps
Once the script is downloaded, copy it to the location where you want to run it from, in an environment where you are connected to the destination cluster where you want the agent deployed.
Run the command using the example below:
chmod +x new-js-aks.sh &&./new-js-aks.sh
The summary for the installation is as below.
Parameter Value
--------- ---------
Mode Create/Update
Kubeconfig default
Host https://20.116.237.9
Namespace turbo
Target Name new-js-aks
Target Subtype Kubernetes
Role turbo-cluster-admin
Version 8.14.5
Auto-Update false
Auto-Logging false
Proxy Server false
Private Registry false
Please confirm the above settings [Y/n]: Y
Your current Kubernetes context is set to the following.
NAME CLUSTER AUTHINFO NAMESPACE
concise-lobster-aks concise-lobster-aks clusterUser_concise-lobster-rg_concise-lobster-aks
Please confirm if the script should work in the above cluster [Y/n]: Y
Creating turbo namespace to deploy Kubeturbo operator
namespace/turbo created
secret/turbonomic-credentials created
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 159k 100 159k 0 0 920k 0 --:--:-- --:--:-- --:--:-- 923k
customresourcedefinition.apiextensions.k8s.io/kubeturbos.charts.helm.k8s.io unchanged
serviceaccount/kubeturbo-operator created
clusterrole.rbac.authorization.k8s.io/kubeturbo-operator unchanged
Skip patching ClusterRoleBinding kubeturbo-operator as the clusterRole has bound to the operator service account already.
deployment.apps/kubeturbo-operator created
namespace/turbo configured
Waiting for deployment 'kubeturbo-operator' to start...
Resource is not ready, re-attempt after 10s ... (1/10)
pod/kubeturbo-operator-857855c6b5-d9x2c condition met
apply Kubeturbo CR ...
kubeturbo.charts.helm.k8s.io/kubeturbo-release created
Waiting for deployment 'kubeturbo-release' to start...
Resource is not ready, re-attempt after 10s ... (1/10)
pod/kubeturbo-release-7d499cf568-cg5sm condition met
Successfully apply Kubeturbo in turbo namespace!
NAME SECRETS AGE
serviceaccount/kubeturbo-operator 0 32s
serviceaccount/turbo-user 0 12s
NAME READY STATUS RESTARTS AGE
pod/kubeturbo-release-7d499cf568-cg5sm 1/1 Running 0 12s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kubeturbo-operator 1/1 1 1 30s
deployment.apps/kubeturbo-release 1/1 1 1 12s
NAME DATA AGE
configmap/turbo-config-kubeturbo-release 2 12s
Done!
Run the command below to verify the 2 pods are running, as shown in the example below:
kubectl get pods -n turbo
NAME READY STATUS RESTARTS AGE
kubeturbo-operator-857855c6b5-d9x2c 1/1 Running 0 105s
kubeturbo-release-7d499cf568-cg5sm 1/1 Running 0 87s
The following image illustrates the Installation.