NOTE: These instructions pertain to clusters that have already been manually provisioned. In order to create a new cluster, see here.

A simple way to launch a new Kubernetes cluster on Azure, is by using Azure Container Service (AKS). From here you can simply launch managed Kubernetes clusters and easily connect them to Hitachi Kubernetes Service.

Getting Started

If you have not done so already, provision a new AKS cluster within Azure. 

After your cluster is fully provisioned, you will need to access you kubeconfig file to find the necessary information to connect to Hitachi Kubernetes Service. 

NOTE: you must have Kubectl and Azure CLI installed before moving forward

  1. Log in to Azure account 

az login 

NOTE: You will need to complete login using a web browser and the provided code

2. Connect your local Kubectl to your AKS cluster. This will merge/update your kubeconfig file to include the new cluster details.

az aks get-credentials --resource-group 'myResourceGroup' --name 'myK8sCluster' 

3. Confirm connection was successful:

kubectl get nodes 

4. Access kubeconfig to get cluster details (using cat in this example)

cat $HOME/.kube/config 

5. From the kubeconfig file we will need four things in order to connect

  1. Server Address
  2. Certificate Authority Details
  3. Client Certificate Data
  4. Client Key Data

Attaching your cluster

Step 1. Click on the "Create" button and choose "Cluster"

Step 2. Choose "Attach Cluster"

Step 3. Give your cluster a name and an environment

Step 4. Input the server address that you obtained from the Kubeconfig, prefixed with 'https://' 

Step 5. Add the Cluster CA cert from your Kubeconfig, and click continue

Step 6. Choose your cluster authentication method

We will be using the "Client Certificate" method of authenticating with the cluster when using AKS.

Step 7. Select optional Kubernetes service plugins

Step 8. Your cluster is now successfully attached! Breathe a sigh of relief at how much easier managing your Kubernetes cluster will be now.

Did this answer your question?