vRA 8 – Create a Kubernetes Blueprint with Custom Form


In my previous post we’ve created Kubernetes Zones and assigned Tags to the Deployment Plans in that Zone. Now we will create a basic Kubernetes Blueprint in vRA 8 by using Cloud Assembly.

The steps we will cover are:

  1. Create K8s Blueprint (Cloud Assembly)
  2. Make K8s Blueprint visible in the Catalog (Service Broker)
  3. Add Custom Form to K8s Blueprint (Service Broker)

Please note that by default your Cluster’s Name will be equal to the Deployment Name.  You need to keep the K8s Naming Convention in mind. This means you should not enter ‘spaces’ for example in your Deployment Name field otherwise your Deployment will fail!

Create K8s Blueprint – Cloud Assembly

The first step is to create a K8s Blueprint which can get deployed using the Deployment Plans we’ve specified in our Kubernetes Zone.

Our Blueprint will have the following:

  1. An input parameter ‘K8s Master Hostname‘ for the Requestor to provide
  2. We will always provision this Blueprint from the Small Deployment Plan we’ve tagged in our previous post with the tagsmall‘.
  3. Will only contain 1 K8s worker node.

The steps below will achieve this:

  1. Log on to vRA 8 and go to Cloud Assembly
  2. Once in Cloud Assembly go to ‘Blueprints‘ and click ‘New‘:
    Screenshot 2020-04-05 at 13.27.17
  3. Provide the details of your Blueprint to your likings:
    Screenshot 2020-04-05 at 13.28.44
  4. Now you will be taken to the Design Canvas of the Blueprint. Search for ‘Kubernetes‘ and drag & drop the ‘K8S Cluster‘ on to the Design Canvas:
    Screenshot 2020-04-05 at 13.29.51
  5. On the right pane you can enter something like this:
    formatVersion: 1
        type: string
        title: K8s Master Hostname
        type: Cloud.K8S.Cluster
          hostname: '${input.hostname}'
          port: 8443
          connectBy: ip
          workers: 1
            - tag: small

    You see that we will provide an Input Parameter to our K8s blueprint of type ‘string‘ and name ‘K8s Master Hostname‘. That Input Parameter will be used to set the Hostname Property of our K8s cluster.
    By defining ‘constraints‘ we define which Deployment Plan to use. In our case it will be the Deployment Plan which is tagged with the ‘small‘ tag.
    Screenshot 2020-04-03 at 20.23.25Also node we will only deploy 1 worker node. This is defined in the property ‘workers‘.

  6. In the UI it should look something like this:
    Screenshot 2020-04-05 at 13.38.26
  7. Lets version our Blueprint by clicking ‘Version‘ on the bottom left:
    Screenshot 2020-04-05 at 13.39.46
    Make sure to select ‘Release this version to the catalog‘ for it to appear in the Service Broker Catalog. Click ‘Create‘ to continue.

Let’s make sure Service Broker sees our Blueprint!

Make K8s Blueprint visible in the Catalog – Service Broker

  1. In Service Broker make sure that you have added ‘Cloud Assembly Blueprint‘ as a Content Source for Service Broker. If your Blueprint does not show up, open your Content Source & click ‘Save & Import‘ again to force the import.
    Screenshot 2020-04-05 at 13.43.14
  2. Now your Cloud Assembly Blueprint should show up under ‘Content‘:
    Screenshot 2020-04-05 at 13.45.45

Let’s create a Custom Form for it!

Add Custom Form to K8s Blueprint – Service Broker

As highlighted earlier: Deployment Name will be the Name of the K8s Cluster. Hence that field cannot contain a white space for example.

In the Custom Form we will rename the Field ‘Deployment Name’ to ‘Cluster Name’. Optionally you can also add Regex Validation on the field to provide descriptive error handling to your requestors.

  1. In Service Broker under ‘Contentclick the ‘3 dots‘ next to our K8s Cluster Blueprint and choose ‘Customize Form‘ (choose ‘Customize Icon’ to set a Custom Icon on the Catalog Item):
    Screenshot 2020-04-05 at 13.48.05
  2. In the Form rename the ‘Deployment Name‘ field to ‘Cluster Name‘ and add a Regex Validation (Optionally). Order the fields to your likings:
    Screenshot 2020-04-05 at 13.54.57
  3. When you’re finished, make sure to click ‘Activate Custom Form‘ for the Form to appear on the Blueprint.
    Screenshot 2020-04-05 at 13.56.12

This is how the result looks like:

Screenshot 2020-04-05 at 13.59.23

Ready for Requesting!

Next up: How to manage your provisioned K8s Clusters in vRA

2 thoughts on “vRA 8 – Create a Kubernetes Blueprint with Custom Form

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s