VMware PKS 1.3 Upgrade

In this post, I want to describe and demonstrate the upgrade process for PKS 1.3. If you want to learn more about the new features and capabilities of PKS 1.3 please have a look at my VMware PKS 1.3 What’s New blog post.

First of all, we need to download the necessary files on the Pivotal web page: https://network.pivotal.io/products/pivotal-container-service

This includes the Pivotal Container Service version 1.3, the compatible Pivotal Cloud Foundry Operations Manager as well as the fitting Stemcell. There is a “Depends On” section at the download page to see which versions need to be downloaded. 

screenshot 2019-01-21 at 08.49.42

Before you begin, make sure that your existing PKS implementation is on a version that can be directly upgraded. If not, you have to do a minor upgrade step in between.

screenshot 2019-01-21 at 08.36.24

Also, make sure that your NSX-T (2.2 or above) and vSphere (6.5 U1 or above) implementation is already on a compatible version (we will not cover NSX-T or vSphere upgrades within this post). Always check the online VMware Product Interoperability Matrices for updates.

The following VMware product versions are compatible with PKS 1.3:screenshot 2019-01-18 at 11.42.40

Step 1 – Upgrade Cloud Foundry Operations Manager

This step is optional if you have a Cloud Foundry Operations Manager (Ops Manager) version in place that is already compatible with PKS 1.3. 

The Ops Manager upgrade procedure is a side-by-side approach with exporting and importing the configuration. We start with exporting the existing configuration via the Ops Manager UI. Simply click on “Export Installation Settings” under the Settings section. 

screenshot 2019-01-18 at 11.58.13

Make a note of the Ops Manager’s FQDN as well as the IP address and shutdown the VM to avoid conflicts. The next step is to deploy the OVA for the new Ops Manager version that we have downloaded at the beginning. 

screenshot 2019-01-18 at 12.09.08

Select the new OVA and enter all necessary information while running through the deployment wizard. Make sure that you reuse the IP address and the FQDN of your previous Ops Manager VM.

screenshot 2019-01-18 at 12.40.38

After the deployment has finished, power on the new Ops Manager VM and connect to the FQDN via a browser. Click on “Import Existing Installation” to import the configuration that we have previously exported.

Screenshot 2019-01-18 at 12.44.58.png

When prompted select the configuration zip file that you want to import and type in the decryption passphrase that you have specified when you first installed Ops Manager.

Screenshot 2019-01-18 at 12.47.52.png

After this, you should be able to login with your credentials and the Ops Manager upgrade is finished.

Step 2 – Upgrade PKS

Now that we have upgraded to the latest and greatest Ops Manager version, we can go ahead and upgrade PKS part. In order to do so, we need to click on “Import a Product” and select the PKS tile that we have downloaded at the beginning. As soon as the import is finished, we can see the new product version on the left side. Click on the little + sign next to it to change the PKS version.

screenshot 2019-01-18 at 14.07.05

After we have clicked on the plus sign, the new version of your PKS tile gets reflected in the UI and we see that there are missing Stemcells for the new PKS version. By the way, if you are wondering what exactly a Pivotal Stemcell is, here you can find out more about it.

screenshot 2019-01-18 at 14.09.36

To upload a new stemcell version, click on “Missing stemcell”. In the Stemcell Library click on “Import Stemcell” and select the Stemcell version that we downloaded at the beginning. 

screenshot 2019-01-18 at 14.23.42

Select for which products you want to apply the new Stemcell and click “Apply Stemcell To Products”.

screenshot 2019-01-18 at 14.39.58

The “Missing stemcell” warning should be gone and we can continue to the last step by clicking on “Review Pending Changes”. If you want to upgrade not only your PKS control plane but also your Kubernetes cluster(s), make sure that the “Upgrade all clusters errand” is selected. 

screenshot 2019-01-18 at 14.50.36

After you have clicked on “Apply Changes”, BOSH will go ahead and magically upgrade your PKS control plane as well as the already rolled out Kubernetes clusters. You can see the progress in Operations Manager UI or use BOSH CLI to monitor the upgrade tasks. You should see the following message after the upgrade is finished successfully. 

screenshot 2019-01-18 at 16.03.08

Let’s check if everything has been upgraded successfully and is up and running again. After you have logged into PKS via the pks login command  …

pks login -a <API> -u <USERNAME> -p <PASSWORD> -k

… you should be able to fetch the credentials from your upgraded Kubernetes cluster.

➜  ~ pks get-credentials k8s-cluster-01

Fetching credentials for cluster k8s-cluster-01.
Context set for cluster k8s-cluster-01.

You can now switch between clusters by using:
$kubectl config use-context <cluster-name>

Now that we have the credentials we can use kubectl to see if our cluster was indeed upgraded to a new Kubernetes version.

➜  ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.8", GitCommit:"7eab6a49736cc7b01869a15f9f05dc5b49efb9fc", GitTreeState:"clean", BuildDate:"2018-09-14T16:06:30Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.4", GitCommit:"f49fa022dbe63faafd0da106ef7e05a29721d3f1", GitTreeState:"clean", BuildDate:"2018-12-14T06:59:37Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}[terminal]

As you can see, we run the Kubernetes server version 1.12.4 which comes with PKS 1.3. The PKS control plane and the Kubernetes clusters have been upgraded successfully. 

Step 3 – Exchange CLIs

The last step is to download and exchange the PKS CLI as well as the kubectl client versions. Make sure you download the right files for your Operating System.

screenshot 2019-01-21 at 09.28.55

In this case, we are going to demonstrate how the process works for Mac OS. If you are using a different Operating System, simply follow the instructions here for PKS CLI and here for kubectl client. 

Simply rename the downloaded PKS CLI file to “pks”, make it executable and move it to the /usr/local/bin/ folder.

➜ ~ mv pks-darwin-amd64-1.3.0-build.126 pks
➜ ~ chmod +x pks
➜ ~ mv pks /usr/local/bin/pks
➜ ~ pks --version

PKS CLI version: 1.3.0-build.126

The same process can be applied for kubectl as you can see here:

➜ ~ mv kubectl-darwin-amd64-1.12.4 kubectl
➜ ~ chmod +x kubectl
➜ ~ mv kubectl /usr/local/bin/kubectl
➜ ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.4", GitCommit:"f49fa022dbe63faafd0da106ef7e05a29721d3f1", GitTreeState:"clean", BuildDate:"2018-12-14T07:10:00Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.4", GitCommit:"f49fa022dbe63faafd0da106ef7e05a29721d3f1", GitTreeState:"clean", BuildDate:"2018-12-14T06:59:37Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}

As you can see from the output, the client version has changed to v1.12.4 and is now on the same level as the Kubernetes server version. 

Additional Sources

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s