In this article, we will configure the various command-line tools that will be used to interact with the PKS Platform which will then be consumed by either the Operators (managing the PKS infrastructure) and/or the the Developers (consumers of the Kubernetes Clusters).

Below is a quick summary, description and the consumers of the CLIs that we will be installing:

CLI Description Consumer
pks Used to create/delete and manage K8S Clusters Operator
kubectl Used to interact with K8S Cluster and deploy applications including scaling up/down Developer
uaac Used to manage user accounts and authorization for the PKS platform Operator
bosh Used to manage PKS deployments and provides information about the VMs using its Cloud Provider Interface (CPI) which is vSphere in this case Operator
om Used to Used to manager and interact with Ops Manager Operator
nsx-cli.sh Used to clean NSX-T objects after a K8S have been deleted (will be Automated by PKS in future release) Operator

Both PKS and Kubectl CLIs are supported on either Windows, MacOS and Linux, you can refer to Part 1 for a link to the binary downloads. The remainder of the tools are primarily used by Operators and to make them accessible for multiple users, you can deploy a centralized management VM. In my lab, I am referring to this VM as the "PKS Client" which is where we will be installing all the CLIs. You can use a variety of supported Operating Systems, but I found Ubuntu to work the best, especially for some of the package dependencies. I did try to use our own PhotonOS, but I was having some trouble figuring out the required packages. If I figure it out, then I will update the article as that may be preferred over Ubuntu if you have never worked with it before.

If you missed any of the previous articles, you can find the complete list here:

Step 1 - Deploy and install a tiny Ubuntu VM (1vCPU, 2GB memory and default disk size). You can use the latest server version, in my lab I happen to have the 16.04 ISO lying around. Ensure the VM has been configured for internet connectivity (can configure proxy access) which will be used to remotely download installers and package dependencies.

Step 2 - Once the Ubuntu VM is available, SCP both the PKS (pks-linux-amd64-1.0.0.*) and Kubectl (kubectl-linux-amd64.*) CLI to VM. If you have not downloaded the binaries, please refer to Part 1 for more details.

Step 3 - SSH to the Ubuntu VM and run the following commands to make binaries executable and renaming/relocating them to /usr/local/bin:

chmod +x pks-linux-amd64-1.0.0-build.3
chmod +x kubectl-linux-amd64-1.9.2
mv pks-linux-amd64-1.0.0-build.3 /usr/local/bin/pks
mv kubectl-linux-amd64-1.9.2 /usr/local/bin/kubectl

Step 4 - To confirm PKS CLI was properly installed, run the following command to ensure the version is displayed:

pks -v

Step 5 - To confirm Kubectl CLI was properly installed, run the following command to ensure the version is displayed:

kubectl version

Step 6 - Run the following command to install the required package dependencies and install Cloud Foundry UAAC:

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

Step 8 - To confirm uaac was properly installed, run the following command to ensure the version is displayed:

uaac -v

Step 9- Run the following commands to install Ops Manager CLI:

wget https://github.com/pivotal-cf/om/releases/download/0.27.0/om-linux
chmod +x om-linux
mv om-linux /usr/local/bin/om

Step 10 - To confirm om was properly installed, run the following command to ensure the version is displayed:

om -v

Step 11 - Run the following commands to install Bosh CLI:

wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-2.0.48-linux-amd64
chmod +x bosh-cli-2.0.48-linux-amd64
mv bosh-cli-2.0.48-linux-amd64 /usr/local/bin/bosh

Step 12 - To confirm bosh was properly installed, run the following command to ensure the version is displayed:

bosh -v

Step 13 - Run the following commands to install NSX CLI helper script:

apt -y install git httpie jq
wget https://storage.googleapis.com/pks-releases/nsx-helper-pkg.tar.gz
tar -xvzf nsx-helper-pkg.tar.gz
chmod +x nsx-cli.sh

At this point, we have successfully configured our PKS Client VM and it is ready to consume the PKS platform once we have it deployed. In Part 3, we will move onto the networking aspects required for PKS and walk through the NSX-T configurations. The article will assume you have already deployed an NSX-T instance with the basic configurations already applied (e.g. Host Prep, Controllers, Edge, Edge Cluster, etc). There are plenty of resources online if you want to walk through an NSX-T deployment, including my Automated NSX-T deployment script which can be found here.

2 thoughts on “Getting started with VMware Pivotal Container Service (PKS) Part 2: PKS Client

  1. Hi William, Thanks for very good articles. I got this error.

    [email protected]:~# apt -y install git httpie jq
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package httpie is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package ‘httpie’ has no installation candidate
    E: Unable to locate package jq
    [email protected]:~#

Thanks for the comment!

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