In my previous post I’ve described how to create Kubernetes cluster manually, today I wanna show you how to do this using PKS and vRealize.
PKS or actually VMware Enterprise PKS formerly known as Pivotal Container Service it is a product which simplify deploy K8s cluster.
However, before we start creating clusters, we must prepare the infrastructure
Ops Manager
For deploy OPS manager we are using OVA provided on Pivotal web page https://network.pivotal.io/products/ops-manager we have there many images but in this case we download Ops for vsphere
The deployment process is quite easy only one thing we should remember to provide SSH public key for user which should have posibilities to manage this machine. If we will not provide this then our VM will shut down in few seconds afer power on

After deployment we can open web page for ops manager and create user. We can use Idendity provider or internal authentication. For this lab purpose I have one internal user.
After login in we can proceed with next step
BOSH Director for vSphere

Before deplyment we need to provide details about our vCenter environment

Create availability Zone

Create Networks

And Assign Availability Zone and Network

When all configs are green

We can go to installation dashboard and Review Changes and apply them for deploy Bosh Director


Installation Logs show to us process

Bosh Director is completed so last part of infrastructure
Enterprise PKS
We need to download PIVOTAL image from web page https://network.pivotal.io/products/pivotal-container-service#/releases/386533 and import in Ops Manager. It take a while as file has almost 5GB but after we will have another element in our dashboard

Configuration is a similar to Bosh Director, as we need to provide few details
Availability Groups and Networks

PKS hostname and Certificate, I have self generated

Information where Kubernetes cluster will be deployed as we can do the deployment from PKS or we can assign it to vRA

and in same way like director review pending changes and apply changes
Now our infrastructure is complete
PKS require from us user for management so on Linux I’ve install element like
- pks
- kubectl
- Development Tools which are required for Ruby
- cf-uaac
- om-linux
- bosh-cli
I will not describe all this installation but only show you how to configure user.
When we have uaac on VM we need to create target
uaac target https://pks.vworld.domain.local:8443 --skip-ssl-validation
next get token from admin
uaac token client get admin -s j5WxDNoz7RImkrnUQjSu8Usb-lwLaurW
where -s parameter is from Pks Uaa Management Admin Client

Now we can create user
uaac user add master --emails master@vworld.domain.local -p VMware1!
and assign the role
uaac member add pks.clusters.admin master
With this user we can login to our PKS and create cluster, but this article is K8s from PKS usin vRealize so lets configure it.
vRealize Automation
In Identity Manager for Containers we need to add our user


Now lets configure our PKS as an Endpoint

Port for UAA is 8443 and for PKS is 9021
after succesfully added we can create and deploy Cluster

After a while we have fully configured Kubernetes cluster




We have dashboard installed on cluster but not able normally login so need to add tunell for our SSH connection

then we can connect to our Linux VM where we have install kubectl and open the Dashboard on Windows machine with standard browser providing config file which can be get from our machine by running this command
pks get-credentials <cluster_name>
and those credentials are available in
~/.kube/config
I’ve copy this to my Windows machine and save in clear text files



Thats it we have second posibilities to create K8s cluster