Deploy vSphere with Tanzu Kubernetes clusters with Aria Automation

In this post we will continue where my last couple of posts left off. They showed how we could create Namespaces through vRealize Aria Automation with a little help from vRealize Aria Orchestrator.

Now we will se how we can create Tanzu Kubernetes Clusters/Guest Clusters/Workload Clusters in vSphere with Tanzu/TKGs with vRA.

Note that this lab environment is running vSphere 7.0.3

Although we in our last post created Namespaces with a vRO workflow to be able to set limits, owner and more, we will revert to the first post and create simple namespaces with the built-in vRA integration in this post.

Create namespace

We have already a Cloud Template for creating namespaces which has been imported in to Service Broker to be requested as a Catalog Item. We will make use of for creating a new vSphere namespace

Create namespace

We'll verify this in vCenter

vSphere namespace

We also have to add this namespace to our Kubernetes zone so that we can use if for deployment

Add to Kubernetes zone

Create Cluster Cloud Template

Now to be able to have a Catalog Item for a Workload Cluster we will create a new Cloud Template.

This version of vRA (8.10) has actually 4 different Kubernetes resources, two namespace and two clusters.

Cloud Template Kubernetes resources

The cluster type we will use in this post is the K8S Cluster. The other type, TKGi Cluster, would be used for Tanzu Kubernetes Grid Integrated clusters.

Actually, when we drag the K8S Cluster resource in to our canvas we can see that the type id actually is Cloud.Tanzu.Cluster

K8S Cluster type

What we also can see is that there is a couple of properties that we need to fill, the Name, and the Plan. The name is obviously the name of the cluster, but let's take a look at the Plan

Cluster Plans

Documentation reference

We can think of a Cluster plan as a kind of flavor mapping or "t-shirt sizes". We can specify configuration templates with the VM class (node size) for Control plane and Worker nodes, the Storage class (Storage Profile), Kubernetes version, etc.

We'll create a plan for small Dev clusters

Small Dev cluster plan

And a plan for small Prod clusters.

Small Prod cluster plan

The only difference is the number of nodes, but in a real-life environment we would probably have different storage profiles and more alternatives around the node sizes.

Cloud Template properties

With this in place we can start building our Cloud Template

We'll add in inputs for the name and the plan and tie these up to the properties of the resource

Resource properties and inputs

Deploy Template

Now, let's try to deploy this template

Deploy Cloud Template

And after a few minutes our cluster should be created

Cluster created

From vRA we can see a few of the cluster details, and also download a Kubeconfig file

Download Kubeconfig

And we'll also have access to a few standard Day 2 actions for the cluster

Available Day 2 actions

Summary

This post has shown how to deploy Tanzu Kubernetes Clusters with Aria Automation. For more information about the capabilities in Aria Automation take a look at the VMware documentation that explains in more detail

In the next post we will take a look at the Day 2 actions available to us.

Thanks for reading

This page was modified on February 16, 2023: Fixed title