A Kubernetes operator used to provision Kubernetes clusters in azure utilizing aks-engine
AKS engine automation provides a Kubernetes native process to creating aks-engine clusters in azure.
Utilizing custom resource definitions of Kind AksCluster
to create and update clusters.
Additional secrets are created for azure credentials(<cluster-name>-secret
) and vm ssh private key(<cluster-name>-privatekey
).
Prerequisites: Aks engine automation requires an azure storage account used to store the aks-engine manifests. This storage account must be in the same subscription as the Kubernetes clusters.
- Create an azure resource group:
az group create --name "aks-operator-group" --location "westus"
- Create an azure storage account:
az storage account create --name "aksoperatorstorage01" --resource-group "aks-operator-group"
Installing the Operator:
helm install deployments/helm/aks-engine-automation \
--name aks-operator \
--set storageAccount.name="aksoperatorstorage01" \
--set storageAccount.group="aks-operator-group"
Once the Operator is installed and running in a kubernetes cluster you can begin creating AksCluster Custom Resources. An sample resource is located in config/samples. The sample contains two resources.
- A kubernetes secret that contains your azure credentials.
- An
AksCluster
custom resource used to define the details of your cluster.
The Operator has two containers. One container is the kubernetes operator itself and will show the logs
related managing the Akscluster
Custom resources. The second container is the opctl
.
The logs from opctl
container show the indivdiual results of each "operation"
(the individual steps of managing clusters: create, update, add node, ect..).
Each of these operations returns the results to standard out.
The operations
are created using opctl
To build new images:
opctl run build
This will build
Requirements:
Steps:
minikube start
make install
- Set environment variables:
export AKS_ENGINE_STORAGE_ACCOUNT_NAME=<name of azure storage account>
(see Prerequisites)export AKS_ENGINE_STORAGE_ACCOUNT_GROUP=<name of azure storage account resource group>
export OPERATIONS_PKG_PATH= <local file path to this repos operations folder>
ex: $GOPATH/src/github.com/zachpuck/aks-engine-automation/operations
make run
In as separate terminal:
- Update sample CR with your azure credentials: ./config/samples/azure_v1beta1_akscluster.yaml
kubectl apply -f ./config/samples/azure_v1beta1_akscluster.yaml
- View the opctl event stream by navigating to http://localhost:42224/#/events
You can now see the created resource by typing kubectl get akcluster
Features:
- create cluster
- delete cluster
- upgrade cluster kubernetes version
- multiple worker node pools
- enable public ip access on nodes
- add/delete node (scaling)
not yet implemented:
- custom vnets
- availability zones
- Virtual machine scale set for masters