Nutanix NKE + Microsoft Azure ARC – Part 1

Nutanix.dev - Nutanix NKE + Microsoft Azure ARC – Part 1

Table of Contents

Intro

Control Plane in the cloud and the Kubernetes cluster on-premises? Why would one consider splitting the data and control plane into two different providers? There are many reasons, compliance, regulations, quality of experience, or performance, to mention a few. 

In this post, we will deploy and connect a Nutanix Kubernetes Engine cluster with Microsoft Azure Arc and deploy a test workload. 

Lab Setup

Lab Setup

As you can see in the figure above, we will be using the built-in services by Nutanix for deploying a Kubernetes cluster with necessary data services provided by Nutanix Volumes on top of Nutanix AHV as a hypervisor.

Prerequisites

  • Nutanix cluster with Prism Central and NKE enabled
  • An Azure account with an active subscription
  • Azure CLI + connectedk8s extension

NKE Cluster Deployment

The first thing we must do is to deploy a NKE cluster. You can check this video from Nutanix University YouTube channel for a quick walkthrough. Deploying a cluster can also be done through CLI, API or IaaC-solutions.

For this blog, we have deployed a development cluster called “nutanix-arc”. It consists of the following components.

  • 1x Kubernetes control plane node
  • 1x etcd node
  • 3x worker nodes

But a production type cluster is also supported.

Graphical user interface, application

Description automatically generated

NKE-enabled Kubernetes clusters come with the CSI driver pre-installed so you don’t have to do any integration with the underlying Nutanix platform to consume data services.

Next is to access your cluster, the simplest way is to leverage the provided script in the NKE console or download the kubeconfig file. 

Easy, now we should have access to the cluster!

Azure Arc Configuration

If you don’t have an Azure account, you can get one for free here: https://azure.microsoft.com/en-us/free/

If you need help setting up Azure CLI, check out this guide:
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli

When you are done installing Azure CLI, we have to add an extension called connectedk8s, this is simply done by pasting the following in your terminal:

az extension add --name connectedk8s

Now, let’s register providers for Azure Arc-enabled Kubernetes:

az provider register --namespace Microsoft.Kubernetes
az provider register --namespace Microsoft.KubernetesConfiguration
az provider register --namespace Microsoft.ExtendedLocation

You can monitor the progress using the following commands:

az provider show -n Microsoft.Kubernetes -o table
az provider show -n Microsoft.KubernetesConfiguration -o table
az provider show -n Microsoft.ExtendedLocation -o table

Azure Deployment

Time to start building and creating stuff in Azure. First, we need to create a resource group:

az group create --name NutanixARC --location northeurope --output table

Output:

Location     Name
-----------  ----------
northeurope  NutanixARC
Graphical user interface, text, application

Description automatically generated

Next is to connect your Kubernetes Cluster to Azure Arc; this requires that you still have access to your cluster via the kubeconfig file.

az connectedk8s connect --name nutanix-arc --resource-group NutanixARC

Output:

Helm release deployment succeeded.

{
      "agentPublicKeyCertificate": "xxxxxxxxxxxxxxxxxxx",
      "agentVersion": null,
      "connectivityStatus": "Connecting",
      "distribution": "generic"
      "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/NutanixARC/providers/Microsoft.Kubernetes/connectedClusters/nutanix-arc",
      "identity": {
        "principalId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "type": "SystemAssigned"
      },
      "infrastructure": "generic",
      "kubernetesVersion": null,
      "lastConnectivityTime": null,
      "location": "northeurope",
      "managedIdentityCertificateExpirationTime": null,
      "name": "nutanix-arc",
      "offering": null,
      "provisioningState": "Succeeded",
      "resourceGroup": "NutanixARC",
      "tags": {},
      "totalCoreCount": null,
      "totalNodeCount": null,
      "type": "microsoft.kubernetes/connectedclusters"
}

After some time you should be able to verify the cluster connection:

az connectedk8s list --resource-group NutanixARC --output table

Output:

Name         Location     ResourceGroup
-----------  -----------  ---------------
nutanix-arc  northeurope  NutanixARC
Graphical user interface, text, application

Description automatically generated

As you can see, Azure Arc deployed a couple of different services on to your Kubernetes cluster. If you want to take a further look at what’s been deployed, you can run the following command:

kubectl get deployments,pods -n azure-arc
Text

Description automatically generated with low confidence

Now we are ready to head over to Azure to start deploying services!


Stay tuned for part 2 of this series for learning more about deploying applications into NKE-enabled Kubernetes clusters using Microsoft Azure Arc-enabled Kubernetes.

Clean Up

If you want to clean up, remember that for blog series part 2 you’ll have to connect a Kubernetes cluster back to Azure Arc. Run the following command to delete the cluster connect:

az connectedk8s delete --name nutanix-arc --resource-group NutanixARC

Run the following command to delete the resource group:

az group delete --resource-group NutanixARC

See you in part 2, coming soon!

© 2024 Nutanix, Inc. All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. Certain information contained in this post may relate to or be based on studies, publications, surveys and other data obtained from third-party sources and our own internal estimates and research. While we believe these third-party studies, publications, surveys and other data are reliable as of the date of this post, they have not independently verified, and we make no representation as to the adequacy, fairness, accuracy, or completeness of any information obtained from third-party sources.