Autoscaling operator
Enabling automation using the DAKR operator.
If you were on an older version of the dakr-operator
(formerly called
balance
) that is now deprecated, please reach out to
support@devzero.io to get migrated.
Prerequisites
Install the latest version of the az
CLI.
The aws
CLI is currently not needed (but it might be needed to access the kubeconfig
of the target cluster).
Install the latest version of the aws
CLI.
Install the latest version of the gcloud
CLI.
Configure IAM
git clone https://github.com/devzero-inc/dakr-operator-installers
cd dakr-operator-installers
Azure AKS
Coming soon! In the meantime, you can use the current deployment of the balance
operator.
AWS EKS
Outputs needed for next steps: ksa_annotation_key_aws
, operator_iam_role_arn
.
terraform init
cd terraform/aws
terraform init
terraform apply
terraform apply \
-var="aws_region=<region>" \
-var="eks_cluster_name=<cluster-name>" \
-var="operator_namespace=<operator-namespace>"
<region>
, <cluster-name>
, <operator-namespace>
.The operator_service_account_name defaults to dakr-operator-sa
(this should match the name under operator.serviceAccount
in helm/dakr/values.yaml
).
Ensure your EKS cluster has an OIDC provider enabled; the Terraform script will attempt to create it if not found.
GCP GKE
Outputs needed for next steps: ksa_annotation_key
, gcp_service_account_email
.
Enable Workload Identity
gcloud container clusters update <cluster-name> \
--location=<location> \
--workload-pool=<project-id>.svc.id.goog
<cluster-name>
, <location>
, <project-id>
.Ensure pods can use GKE metadata server
gcloud container node-pools update <nodepool-name> \
--cluster=<cluster-name> \
--location=<location> \
--workload-metadata=GKE_METADATA
<nodepool-name>
, <cluster-name>
, <location>
.terraform init
cd terraform/gcp
terraform init
terraform apply
terraform apply \
-var="gcp_project_id=<project-id>" \
-var="gcp_region=<region>" \
-var="gke_cluster_name=<cluster-name>" \
-var="operator_namespace=<operator-namespace>"
<project-id>
, <region>
, <cluster-name>
, <operator-namespace>
.Deploy dakr-operator
In helm/dakr/values.yaml
, locate operator.serviceAccount.annotations
. Based on the terraform apply
, replace the placeholder values.
Ensure the service account name matches (default: dakr-operator-sa
).
Deploy the operator:
helm upgrade --install <release-name> ./helm/dakr \
--namespace <operator-namespace> \
--create-namespace
<release-name>
can be replaced with you desired name.
<operator-namespace>
must be replaced with a value that matches operator_namespace
in terraform apply
.