Onboarding clusters programmatically
Dynamic clusters provisioning tutorial.
Last updated
Dynamic clusters provisioning tutorial.
Last updated
PerfectScale enables the dynamic provisioning of clusters with ease, requiring only a few simple steps. Additionally, it supports mass provisioning, making it efficient for larger deployments. In this case, PerfectScale Helm needs to be included in the set of provisioned workloads of the cluster.
To provision clusters dynamically, you need the clientId
and clientSecret
.
Follow steps 1 - 4 of the Onboarding a cluster instructions to get your clientId
and clientSecret
.
If you have already installed the exporter and need to recall the clusterName, clientID, and clientSecret, you can retrieve them using the following commands accordingly:
kubectl -n perfectscale describe deployment perfectscale-exporter | grep CLUSTER_NAME
kubectl -n perfectscale get secret perfectscale-exporter-secret -o jsonpath="{.data.clientId}" | base64 --decode
kubectl -n perfectscale get secret perfectscale-exporter-secret -o jsonpath="{.data.clientSecret}" | base64 --decode
Add PerfectScale Helm from the following link.
Set dynamic variables per the environment that will include the following values:
--set settings.clusterName=
the name of your cluster. To prevent any confusion, it is recommended that unique values be utilized for the cluster name.
clusterName
is mandatory. PerfectScale Agent will not work if the cluster name is not provided.
--set settings.clusterOptimizationPolicy
is an optional parameter that allows you to specify the desirable resilience level for the cluster. These are the available values:
MaxSavings - maximum cost savings, the best for non-production environments
Balanced (default) - optimally balances cost and resiliency
ExtraHeadroom - the best fit for latency-sensitive environments
MaxHeadroom - keeps the environment above the highest spikes
Discover more about customizing the Optimization policy here.
Once the variables are identified, each cluster, provisioned with the PerfectScale Agent, will be automatically registered and transmit its data.
If you have deleted the exporter and want to reconnect the same cluster to PerfectScale, you can easily do so by using the same clusterName
, clientID
, and clientSecret
.