Integrating vRA with Pivotal Container Service (PKS)

Posted by

Overview

This guide will show you how to integrate vRA with PKS.

Get the PKS API address

We will need the PKS API address in order to configure a PKS endpoint in vRA. You can get by opening Ops Manager and select the Pivotal Container Service tile:

2018-10-16_12-32-07.png

Select PKS API and then and note the value in API Hostname (FQDN):

2018-11-08_12-19-02.png

Create the vRA PKS endpoint

vRA Permissions

In order to add the PKS endpoint you’ll need an account that has the Container Administrator role. You can add/verify this by going to Administration > Users & Groups > Directory Users and Groups and searching for the user:

2018-11-08_12-19-19.png

Select the user and add/verify the Container Administrator role:

2018-11-08_12-19-31.png

Add PKS Credential

Before we can add the PKS endpoint we will need a credential for the PKS API. To do this go to Containers > Identity Management > +Credential.

2018-11-08_12-19-40.png

Give the credential a name, select Username and enter your PKS API credentials. These are the same credentials you’d enter when using the PKS command to login (for example: pks login -a uaa.vmware.local -u chris -p VMware1! -k):

2018-11-08_12-19-52.png

Select Save.

Create PKS endpoint

Now we can create the endpoint by going to Containers > Endpoints > PKS Endpoints > New Endpoint and enter the following:

2018-11-08_12-20-05.png

Press Test Connection and you’ll receive two certificate messages. One for port 8443 and one for port 9021:

2018-11-08_12-20-12.png

2018-11-08_12-20-18.png

Select Show Certificate to verify the cert and if you’re okay with it select Yes.

2018-11-08_12-20-29.png

Select Create to create the endpoint and you should see the following:

2018-11-08_12-20-37.png

Plan Assignments

In order to add new PKS clusters, you’ll need to create a Plan Assignment. You can do this by selecting the new PKS endpoint and then selecting the Plan Assignments tab. Here I’ve associated the admins business group with the PKS small plan.

2018-11-08_12-20-46.png

Add an existing PKS cluster

Existing PKS clusters don’t automatically appear in vRA so we will need to add them. Go to Containers > Infrastructure > PKS Clusters > Add Cluster:

2018-11-08_12-20-55.png

On the Add Cluster screen select the appropriate PKS Endpoint and you’ll see the existing clusters:

2018-11-08_12-21-04.png

Select the cluster(s) you want to add and the method you want to connect by. Press Add once you’re ready. If successful, you’ll see the following:

2018-11-08_12-21-10.png

Accessing the clusters

Select the kabob menu (three vertical dots) and then details:

2018-11-08_12-21-17.png

Here we can see the cluster details:

2018-11-08_12-21-25.png

From here we can edit the cluster (modify the number of worker nodes) and download the kubeconfig.

Create a new PKS cluster

We can create a new cluster by going to Containers > Infrastructure > PKS Clusters > New Cluster:

2018-11-08_12-21-36.png

On the New Cluster screen fill in the required settings and press Create.

2018-11-08_12-21-44.png

You may need to refresh the page, but you should see the cluster provisioning:

2018-11-08_12-21-52.png

Once it’s complete you will see:

2018-11-08_12-22-00.png

2 comments

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