aksctl is an easy to use CLI(Command Line Utility) for creating and managing Kubernetes Cluster on Azure AKS ( Azure Kubernetes Service). It is written in Go.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need to have Azure credentials configured. What works for AZ CLI should be sufficient. If you dont have Azure CLI installed, you can refer here
To install aksctl from source code with building by yourself, clone the repository using:
git clone https://github.com/adfolks/aksctlThen, initiate module with:
go mod init github.com/adfolks/aksctlThis will create a module config file go.mod.
Finally, use
go buildto fetch the latest dependencies.
To install aksctl on linux bash from release binary:
release=v0.1.0 ## choose the available release version
curl --silent --location "https://github.com/adfolks/aksctl/releases/download/$release/aksctl-$(uname -s)-amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/aksctl /usr/local/binTo install aksctl on windows using chocolatey, run:
choco install aksctlA default cluster can be created by running:
aksctl create clusterThis command will be using values from default.yaml located at the root directory,
edit default.yaml with reference to keys from template.yaml for specifying more parameters
A cluster's mandatory parameters can be overridden using flags while running the command.
aksctl create cluster --name
--rgroupname
--rgroupregionExample: Running the code
aksctl create cluster --rgroupname myresourcegroupFlags can be used with shorthand name as well
aksctl create cluster -r myresourcegroupabove code will create a resource group with the name myresourcegroup.
You can also customize your cluster by using a config file.
For this, create a .yaml a file like config.yaml with reference to keys from template.yaml.
Next, run the command:
aksctl create cluster --file configto apply the config.yaml file.
This will create a cluster as described in the file.
A cluster can be deleted by running:
aksctl delete clusterGet the list of clusters by running:
aksctl get clusteraksctl can be installed by following the above instructions.
Check aksctl.io to learn more about what aksctl can do and its features.
- Go