Anthos clusters on AHV: Getting started

Table of Contents

On January 2021 was announced Anthos clusters on AHV for running Kubernetes on-prem. This announcement brings freedom of choice to Google and Nutanix customers, with no need to be paying a hypervisor license anymore.

To help with the process for getting started with Anthos on AHV, this article covers the process using two automated methods that are ready to go. With this automation you can get an Anthos cluster on AHV in under one hour.

If you are familiar with Anthos bare metal architecture, you can move straight to your preferred automation method. Otherwise, continue reading to know more about what the Anthos architecture on AHV looks like and what you’ll get by using the automation methods covered below.

Be aware that running Anthos on any model will still have an associated cost, even if you run with on-prem compute resources. Please see the Google Anthos pricing page for more information.

Architecture

Anthos clusters on AHV uses Anthos bare metal, where the requirement is to run the Anthos nodes with a supported operating system version. Detailed information is provided by the Google Anthos hardware and software documentation:

  • Ubuntu 18.04/20.04 LTS
  • Red Hat Enterprise Linux 8.1
  • CentOS 8.1

The Anthos Ready platform partners page shows the list of supported Linux distributions for running Anthos clusters version 1.6.x on Nutanix:

  • CentOS 8.2
  • RHEL 8.2
  • Ubuntu 18.04 LTS

When using the Calm blueprint or Terraform file, you will get a hybrid Anthos cluster. Please see the Google Anthos documentation for detailed information on the available deployment models:

This deployment model is a specialized multi-cluster deployment. Use this model to run user workloads on your admin cluster. Your admin cluster still manages additional user clusters. You can create a hybrid cluster deployment from a standalone cluster deployment by adding more user clusters to support multiple teams or workload types.

This model meets the following requirements:

– Allows re-use of control plane nodes for user workloads.

– There are no security concerns regarding running user workloads on your admin cluster, which contains sensitive data.

https://cloud.google.com/anthos/clusters/docs/bare-metal/1.6/installing/install-prep#hybrid_cluster_deployment

If you are interested in using any other Anthos deployment model, you can easily adapt the Calm blueprint or Terraform configuration to meet your requirements.

Whatever automation method you choose, you will get the following setup:

Anthos clusters on AHV architecture diagram

Provisioning

  • A hybrid Anthos deployment running on a single AHV cluster
  • Operating system is CentOS 8.2
  • 6x VMs with the following roles:
    • Admin workstation (1x VM). This machine is not part of the hybrid cluster. It is used for the creation of the Kubernetes cluster as well as for lifecycle management
    • Control plane nodes (3x VMs). Highly available control plane that runs components like: etcd, kube-apiserver, cert-manager, istio and many others
    • Worker nodes (2x VMs). Highly available node pool for running containerized workloads. The pool can be scaled out with more worker nodes
  • The Nutanix CSI plug-in for persistent storage is available and configured to use Nutanix Volumes
  • A default StorageClass named nutanix-default is configured

Lifecycle management

  • Scale out/in. Adding or removing worker nodes to increase or decrease your cluster capacity is included
  • Anthos upgrade. You can easily upgrade to a new Anthos version
  • Cluster decommissioning. When deleting a Anthos cluster, it will get removed from GCP too

Prerequisites

Before using any of the automation methods, make sure to meet the following requirements:

Automation
  • Calm:
    • 3.0.0.2 or later
    • A project with AHV account

    ~ or ~

  • Terraform:
    • 0.13.x or later
    • Nutanix provider 1.2.x or later
Credentials
  • (Calm only) SSH key. It must start with —BEGIN RSA PRIVATE KEY—
  • Prism Element account with User Admin role
  • Prism Central account with CRUD VM permissions
Networking
  • Internet connectivity
  • AHV IPAM pool with minimum 6 IP addresses
  • Kubernetes:
    • Control plane VIP
    • Ingress VIP
    • Load balancing pool
Nutanix
  • Prism Element cluster:
    • AHV: 20201105.1045 or later
    • AOS: 5.19.1 or later
    • iSCSI data service IP configured
    • VLAN network with AHV IPAM configured
  • Prism Central: 2020.11.0.1 or later
Google Cloud
  • A project with Owner role
  • Project must have monitoring enabled (console)
  • A service account (how-to)
    • Role: Project Owner
    • A private key: JSON format

Using Calm for Anthos on AHV

Summary:

  • Visit the official Anthos on AHV GitHub repository
  • Set blueprint credentials (Prism Element, Prism Central, Google Cloud Platform and SSH key)
  • Configure VM network
  • Configure application profile variable values

There are two ways to get the Anthos blueprint in Calm:

  • Importing the blueprint in JSON format
  • Using the Nutanix Calm DSL

The official Anthos on AHV GitHub repository includes detailed instructions for both options, depending on which option suits your requirements.

Anthos on AHV Calm blueprint

The benefit of using Calm is that you can have a marketplace for driving self-service through the UI, but at the same time provide Infrastructure as Code (Calm DSL) for your developers if they prefer to proceed with using the Nutanix Calm UI.

The blueprint also includes the mentioned day-2 operations. For example:

  • Scale out your worker node pools with more instances
  • Upgrade your Anthos cluster version
  • Decommission a cluster by removing it gracefully from GCP
  • (and others)

Using Terraform for Anthos on AHV

Summary:


There is also a Terraform automation option as an alternative to Calm. The official Anthos on AHV GitHub repository includes all the steps for setting up Terraform.

Successful Terraform deployment of Anthos on AHV

Like with the Calm blueprint, the Terraform automation also includes the mentioned day-2 operations. For example:

  • Scaling
  • Upgrading
  • Decommissioning your Anthos clusters
  • (and others)

Conclusion

Nutanix HCI with AHV is the best platform for running Anthos clusters on-prem. A platform that includes the hypervisor at no additional cost but, most importantly, persistent storage for your cloud native applications.

With Nutanix Test Drive you can try the leading hyperconverged platform. We welcome you to give it a go and share your experience with us on social media!

© 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.