Using Azure cluster provider¶
Azure service principal must have the Contributor, Key Vault Secrets Officer roles to be able to provision and destroy Azure AKS clusters.
Before provisioning the Kubernetes cluster, add override for the
configuration
file to scope deps
for the target Kubernetes cluster.
controlPlane:
spec:
## Kubernetes version
version: v1.29.8
machinePools:
system:
enabled: true
app:
enabled: true
replicas: 1
spec:
mode: User
sku: Standard_B2ls_v2
osDiskSizeGB: 30
nodeLabels:
db: app
scaling:
minSize: 1
maxSize: 1
# ...
Using the example above and the example from the cluster-deps repository you can add the required number of machine pools depending on the requirements for distribution into individual roles.
For the Azure provider, before launching the actual provisioning of the cluster, RMK will perform the following preliminary steps:
- Create secrets with private SOPS Age keys in the Azure Key Vault, if they have not been created previously.
To start provisioning a Kubernetes cluster, run the commands:
rmk cluster capi provision
When the cluster is ready, RMK automatically switches the Kubernetes context to the newly created cluster.
To destroy a Kubernetes cluster, run the command:
rmk cluster capi destroy
After the cluster is destroyed, RMK will delete the context for the target Kubernetes cluster.