Pivotal Container Service (PKS)

Installing Pivotal Container Service PKS Ubuntu Workstation for Managing Kubernetes

A look at Installing Pivotal Container Service PKS Ubuntu Workstation for Managing Kubernetes and the components required to interact with Kubernetes

In the home lab, I have still been playing around with a PKS installation and getting a Kubernetes cluster up and running on top of my vSphere 6.7 Update 1 vSAN environment. The Pivotal Container Service is a great way to get started with Kubernetes, especially if you are familiar and run VMware vSphere. There are many great advantages to running Kubernetes on top of VMware vSphere as you get all of the benefits of vSphere underneath Kubernetes and your containers. After having gone through getting the PCF Ops Manager appliance up and running and also configuring the Pivotal Container Service, I needed a workstation to interact with the Kubernetes installation through BOSH and provisioning a Kubernetes cluster.ย  Let’s take a look at Installing Pivotal Container Service Ubuntu Workstation for Managing Kubernetes Cluster.

Installing Pivotal Container Service PKS Ubuntu Workstation for Managing Kubernetes

After installing the Bosh Director PCF Ops Manager appliance and then installing the Pivotal Container Service application into the appliance, you are provisioning the platform that allows running the Kubernetes clusters on top of vSphere.ย  You still need a client to interact with the Kubernetes Cluster(s) that has all the command line tools installed for doing this.ย  The command line tools can be installed on Windows, Linux, or Mac platforms.ย  I like the ease of which the CLI tools and other requirements are installed into Linux, so for me, this made the best platform for getting this up and running quickly inside the home lab environment.

I want to preface this post with the fact that most if not all of the information that was gathered for successfully installing a PKS workstation for managing the PKS installation in the home lab came from a couple of blog posts.ย  These guys are the masters of this and many other VMware technologies and definitely worth checking out their posts on PKS and Kubernetes.

For the most part the information presented here is me following through the posts from each and gathering the needed information for my installation.ย  I have updated the components according to the latest and greatest components at the time of writing.ย  To get my feet wet with running PKS in the home lab and provisioning a Kubernetes Cluster, I followed more of Cormac’s environment from a simpler networking perspective.ย  I wasn’t running NSX in the environment and am simply provisioning everything into a flat subnet on a single vSwitch.ย  I plan on introducing NSX at a later date and with further installations.

For my PKS “workstation” I am using an Ubuntu Server 18.04 LTS installation.ย  You don’t need much of anything from a virtual hardware perspective to run the components we are talking about installing for managing the PKS installation.ย  My VM is configured as follows:

  • 1 vCPU
  • 1 GB RAM
  • 16 GB disk
Installing-Pivotal-Container-Service-PKS-Ubuntu-Workstation-Managing-Kubernetes
Installing Pivotal Container Service PKS Ubuntu Workstation Managing Kubernetes

We will look at the following components that need to be installed for getting up and running and interacting with the Kubernetes cluster:

  • PKS CLI
  • Kubectl CLI
  • Cloud Foundry UAAC
  • Ops Manager CLI
  • BOSH CLI

Installing PKS CLI and Kubectl CLI

The first thing you need to do is browse out toย download theย required PKS CLI components here: https://network.pivotal.io/products/pivotal-container-service

Download-the-PKS-CLI-and-Kubectl-CLI-for-Pivotal-Container-Service-PKS
Download the PKS CLI and Kubectl CLI for Pivotal Container Service PKS

Once you have downloaded the CLI utilities, copy them over to a temporary directory on the Ubuntu installation.ย  Below, I am simply copying them over to theย /tmp directory.

Copy-the-files-out-to-a-temporary-directory-on-your-Ubuntu-workstation
Copy the files out to a temporary directory on your Ubuntu workstation

Change the permissions on the two files to includeย execute permissions.

Make-sure-the-files-have-execute-permissions-enabled
Make sure the files have execute permissions enabled

Now we can copy them to their permanent locations on the Ubuntu installation:

mv pks-linux-amd64-1.2.1-build.8 /usr/local/bin/pks
mv kubectl-linux-amd64-1.11.3 /usr/local/bin/kubectl
Verifying-PKS-CLI-is-now-installed
Verifying PKS CLI is now installed
Verifying-Kubectl-CLI-is-installed
Verifying Kubectl CLI is installed

Installing Cloud Foundry UAAC

In Ubuntu, using the command line, we can install the Cloud Foundry UAAC without copying files, etc.

apt -y install ruby ruby-dev gcc build-essential g++
gem install cf-uaac

As you can see below, the version installed at the time of writing was 4.1.0.

Verifying-the-version-of-Cloud-Foundry-UAAC-installed
Verifying the version of Cloud Foundry UAAC installed

Installing Ops Manager CLI

Next, we install Ops Manager CLI which again can be done using the command line.ย  To check to see the latest version for your command, navigate to:ย ย https://github.com/pivotal-cf/om/releases/

wget https://github.com/pivotal-cf/om/releases/download/0.44.0/om-linux
chmod +x om-linux
mv om-linux /usr/local/bin/om
Verifying-that-Ops-Manager-CLI-was-successfully-installed-and-the-version
Verifying that Ops Manager CLI was successfully installed and the version

Installing BOSH CLI

To see the latest version of BOSH CLI for installation, navigate to the following page and scroll down to the bottom to see the latest build:

https://s3.amazonaws.com/bosh-cli-artifacts

wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-5.4.0-linux-amd64
chmod +x bosh-cli-5.4.0-linux-amd64
mv bosh-cli-5.4.0-linux-amd64 /usr/local/bin/bosh
Verifying-BOSH-CLI-installation-and-version
Verifying BOSH CLI installation and version

Now that we have our five components installed into our Ubuntu Server 18.04 installation, we can move forward with getting the Kubernetes cluster provisioned.

Takeaways

The process forย Installing Pivotal Container Service PKS Ubuntu Workstation for Managing Kubernetes requires a few short and simple component installations.ย  These include installing the PKS CLI, Kubetcl CLI, Cloud Foundry UAAC, Ops Manager CLI, and BOSH CLI components.ย  With an Ubuntu 18.04 Server installation, the process only takes a few minutes to get the components downloaded and copied to the correct locations and then verifying the components, versions, etc.ย  Now that the components are installed and ready to go, we can interact with the Kubernetes installation and begin the process of provisioning our first Kubernetes cluster.ย  More to come with running Kubernetes clusters inside of VMware vSphere!

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.