Azure AKS

This example demonstrates provisioning an Azure Kubernetes Service (AKS) cluster on the Azure cloud. The deployment consists of:

In this example, we will deploy only the cluster. Later, in the more advanced examples (multi-cloud examples) we will leverage this setup as the basis for deploying a containerized service.

Prerequisites

This example expects the following prerequisites:

Cloudify CLI or Cloudify Management Console?

Cloudify allows for multiple user interfaces. Some users find the Cloudify Management Console (web based UI) more intuitive while others prefer the Cloudify CLI (Command Line Interface). This tutorial and all following ones will describe both methods.

Cloudify Management Console

This section explains how to run the above described steps using the Cloudify Management Console. The Cloudify Management Console and Cloudify CLI can be used interchangeably for all Cloudify activities.

Import Plugins and Secrets

To connect to Azure, credentials and Cloudify plugins are required. Cloudify recommends storing such sensitive information in a Cloudify secret. Secrets are kept encrypted in a secure way and used in run-time by the system. Learn more about Cloudify secrets here.

Azure credentials can be created by following the guide here.

Cloudify version 6+ offers a fast-track process to import both credentials and all necessary plugins. As soon as the Cloudify Management Console loads, it will present several “getting started” options. Choose the Azure option and enter the requested credentials to automatically import the required secrets and plugins.

Azure getting started

Azure import access

Azure import summary

Validate Secrets

To view the imported secrets in the Cloudify Manager, log in to the Cloudify Management Console and select the Resources page and navigate to the Secrets tab. The following secrets should exist after following the above steps:

Notes

Validate secrets for this example

Validate Plugins

To view the imported plugins in the Cloudify Manager, log in to the Cloudify Management Console and select the Resources page and navigate to the Plugins tab. The following plugins should exist after following the above steps:

Required plugins for this example

Deploy an Azure AKS Cluster

On the Blueprints page, click the Create deployment button for the Kubernetes-Azure-AKS blueprint.

Click the Deploy & Install button at the bottom of the form to start the deployment. On the following page, click the Execute button.

Azure blueprints

You now have a Cloudify Deployment running the default install workflow. Cloudify will begin actively interfacing with Azure to deploy an Azure AKS Kubernetes cluster. You can track the status of the Deployment in the Execution Task Graph panel on the Deployments page.

Azure Kubernetes cluster complete


Using the Azure AKS Cluster

Install CLI Tools

Kubectl

Azure documentation: https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html

Azure CLI

Azure documentation: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli

To initialize Kubectl, go to the Azure Console, navigate to the Kubernetes Service page, select your cluster, and click Connect. This will display a CLI command to use to set up the Kubectl config.

kubectl access

# Example GKE Kubectl init command
az aks get-credentials --resource-group aks-test-rgaks --name aks-test-mcaks

Verify access

# List version
kubectl version

# List namespaces
kubectl get ns

# List nodes
kubectl get nodes