This is the first step of implementing https://github.com/kubernetes/autoscaler/issues/3583#issuecomment-743215343. New method was added to cloudprovider interface. All existing providers were updated with a no-op stub implementation that will result in no behavior change. The config values specified per NodeGroup are not yet applied. |
||
|---|---|---|
| .. | ||
| examples | ||
| internal | ||
| README.md | ||
| exoscale_cloud_provider.go | ||
| exoscale_cloud_provider_test.go | ||
| exoscale_manager.go | ||
| exoscale_manager_test.go | ||
| exoscale_node_group.go | ||
| exoscale_node_group_test.go | ||
| request_test.go | ||
| vendor_internal.sh | ||
README.md
Cluster Autoscaler for Exoscale
The Cluster Autoscaler (CA) for Exoscale scales worker nodes running in Exoscale Instance Pools.
Configuration
Note: the following guide assumes you have the permissions to create resources in the
kube-systemnamespace of the target Kubernetes cluster.
In order to interact with the Exoscale API, the Exoscale CA must be configured with API credentials. This can be achieved using Kubernetes Secrets, by exposing those as container environment variables.
We provide a convenience script that generates and applies a k8s manifest declaring Exoscale API credentials as a k8s Secret in your cluster from your local shell environment variables: once created, this Secret can be used in the CA Deployment.
First, start by exporting the Exoscale API credentials (we recommend that you create dedicated API credentials using the Exoscale IAM service) to provide to the CA in your shell:
export EXOSCALE_API_KEY="EXOxxxxxxxxxxxxxxxxxxxxxxxx"
export EXOSCALE_API_SECRET="xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Next, run the following command from the same shell:
./examples/generate-secret.sh
Finally, ensure that the exoscale-secret Secret has been created
successfully by running the following command:
kubectl get secret --namespace kube-system exoscale-credentials
Deploying the Cluster Autoscaler
To deploy the CA on your Kubernetes cluster, you can use the manifest provided as example:
kubectl apply -f ./examples/cluster-autoscaler-run-on-control-plane.yaml
⚠️ Important Notes
- The minimum node group size is 1
- The maximum node group size is computed based on the current Compute instances limit of the Exoscale account the Cluster Autoscaler is running in.
- It is not possible to target which Exoscale Instance Pool will be scaled. The Instance Pool candidate for scaling is determined based on the Compute instance the Kubernetes node is running on, depending on cluster resource constraining events emitted by the Kubernetes scheduler.