Upgrade to VMware Enterprise PKS 1.6

Upgrading to VMware Enterprise PKS 1.6 is very easy, and the best thing is, every time you upgrade to a new Enterprise PKS version, you get a new Kubernetes version for your clusters. In this simple blog post, I want to demonstrate how to get from PKS 1.5 and Kubernetes version 1.14 to PKS 1.6 and Kubernetes version 1.15.

Process wise not much changed since I have written an upgrade blog post for PKS 1.3, but this time I will use the “pks cluster-upgrade” command, which is available since PKS version 1.5 and allows for individual K8s cluster upgrades.

As always, I recommend having a look at the official documentation for completion. The Enterprise PKS 1.6 upgrade documentation can be found here.

1. Prepare

First of all, download the Ent. PKS version 1.6 here. Check if your existing Ops Manager version is compatible with PKS 1.6, check the “DEPENDS ON” section. Make sure to download the correct Pivotal Stemcell and the CLIs as well (PKS CLI, Kubectl).

Screenshot 2019-11-29 at 14.58.30

I am running Ops Manager version 2.6.11, not the latest one but compatible, and we can move on. If you want to know how to upgrade to a newer Ops Manager version, have a look at my old blog post about “Upgrading PKS to version 1.3“. We should also check if the NSX-T and vSphere version is compatible with the PKS version we want to upgrade to. Let’s have a look at the VMware Interoperability Matrix for it.

Screenshot 2019-11-29 at 15.09.59

The environment I am working with has vCenter 6.7U3, ESXi 6.7U2, and NSX-T 2.5 installed, so we are good to go. I had to upgrade my NSX-T environment from 2.4.1 to 2.5 upfront, which I described in this blog post.

2. Execute

Step 1 – Upgrade PKS

We have checked the requirements and compatibility, and now we can execute the upgrade. We have to connect to the Ops Manager first and click on “IMPORT A PRODUCT on the lefthand side and upload the new PKS version.

Screenshot 2019-11-29 at 15.18.06

After we have imported the PKS version, click on the little Plus + sign next to it.

Screenshot 2019-12-07 at 21.02.14

You will notice that the PKS tile changed to version 1.6.0 and that it will report a missing stemcell. Click on “Missing stemcell” to upload and assign the correct version.

Screenshot 2019-12-07 at 21.18.34

Click on “Import Stemcell” and upload the required stemcell for PKS 1.6.

Screenshot 2019-12-08 at 00.15.28

Apply the new stemcell to PKS v1.6.0.

Screenshot 2019-12-08 at 00.20.33

As you can see, the Enterprise PKS tile changed to green.

Screenshot 2019-12-08 at 07.09.30

We should check if there are new configuration items that we want to use. Click on the Enterprise PKS tile to review the config. For example, there is a new tab for “Tanzu Mission Control” integration, which is currently in experimental status.

Screenshot 2019-12-08 at 07.18.05

We are not going to cover Tanzu Mission Control in this blog post, but if you want to learn more about what is coming with TMC, visit the following links:

Another configuration that we need to change before we continue can be found under “Errands”.

Screenshot 2019-12-08 at 07.29.35

Make sure to turn off the “Upgrade all clusters errand” as we want to use the “pks upgrade-cluster” command to upgrade the K8s clusters individually.

Screenshot 2019-12-08 at 07.29.48

Warning: Be aware of the following limitation. If you only upgrade the PKS tile, you won’t be able to execute resize or update operations until you have upgraded the K8s clusters as well. 

Make sure to save your configuration changes, return to the main page, and click on “REVIEW PENDING CHANGES”.

Screenshot 2019-12-08 at 07.27.56

Double-check that the “Upgrade all clusters errand” is disabled and review the changes that you have made. We are ready to start the upgrade of PKS, click on “Apply Changes”.

Screenshot 2019-12-08 at 07.39.47.png

We can follow the progress via the Ops Manager UI or use the Bosh CLI. If you want to learn how to configure and use the Bosh CLI, have a look at one of my previous blog posts about scaling a K8s cluster with PKS.

Screenshot 2019-12-08 at 10.06.34.png

After the upgrade completed successfully, we can move on to step 2.

Step 2 – Exchange CLIs

Now we need to exchange the old CLIs (PKS, Kubectl) with the new version we have downloaded during step 1. Simply move the binaries in the right folder and make sure they are executable.

➜  ~ pks --version

PKS CLI version: 1.5.1-build.15

➜  ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.6", GitCommit:"96fac5cd13a5dc064f7d9f4f23030a6aeface6cc", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:49Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.5", GitCommit:"0e9fcb426b100a2aea5ed5c25b3d8cfbb01a8acf", GitTreeState:"clean", BuildDate:"2019-08-05T09:13:08Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

➜  ~ mv /Users/aullah/Downloads/pks-darwin-amd64-1.6.0-build.225 /usr/local/bin/pks
➜  ~ chmod +x /usr/local/bin/pks
➜  ~ mv /Users/aullah/Downloads/kubectl-darwin-amd64-1.15.5 /usr/local/bin/kubectl
➜  ~ chmod +x /usr/local/bin/kubectl

➜  ~ pks --version

PKS CLI version: 1.6.0-build.225

➜  ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.5", GitCommit:"0e9fcb426b100a2aea5ed5c25b3d8cfbb01a8acf", GitTreeState:"clean", BuildDate:"2019-08-05T09:13:08Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Step 3 – Upgrade K8s

Finally, we can continue to the last step and execute a rolling upgrade from K8s 1.14.5 to K8s 1.15.5. Review your existing K8s clusters and versions with the “pks clusters” command. Use the “pks upgrade-cluster” command to upgrade individual K8s clusters. If you want to follow the process, use the Bosh CLI.

➜  ~ pks clusters

Upgrade is available to PKS Version: 1.6.0-build.17

PKS Version     Name    k8s Version  Plan Name  UUID                                  Status     Action
1.5.0-build.32  k8scl1  1.14.5       small      c9dbee0e-41c0-4fef-8dfe-12e98b46843b  succeeded  UPDATE

➜  ~ pks upgrade-cluster k8scl1

You are about to upgrade k8scl1.
Warning: This operation may be long running and may block further operations on the cluster(s) until complete

Continue? (y/n):y
Your taskID for the upgrade task is: 75a59895-b6e4-4590-b22d-5b5854e0d726

➜  ~ bosh task -a
Using environment '192.168.96.1' as client 'ops_manager'

Task 273779

Task 273779 | 21:52:36 | Preparing deployment: Preparing deployment
Task 273779 | 21:52:39 | Warning: DNS address not available for the link provider instance: pivotal-container-service/7a54af21-940d-47a6-9d9c-ce0072ec6549
Task 273779 | 21:52:39 | Warning: DNS address not available for the link provider instance: pivotal-container-service/7a54af21-940d-47a6-9d9c-ce0072ec6549
Task 273779 | 21:52:39 | Warning: DNS address not available for the link provider instance: pivotal-container-service/7a54af21-940d-47a6-9d9c-ce0072ec6549
Task 273779 | 21:52:52 | Preparing deployment: Preparing deployment (00:00:16)
Task 273779 | 21:52:52 | Preparing deployment: Rendering templates (00:00:05)
Task 273779 | 21:52:58 | Preparing package compilation: Finding packages to compile (00:00:00)
Task 273779 | 21:52:58 | Compiling packages: nsx-cni/a136d3bfda53c9ee66d5df14363ec14fd0c57b9a
Task 273779 | 21:52:58 | Compiling packages: nsx-cni-common/9dbd749995b475d3ae3bb5b4c7579035bca73f44
Task 273779 | 21:52:58 | Compiling packages: nsx-python27/75df9f63298d0d2644c6030b160b9b7486a9c195
Task 273779 | 21:52:58 | Compiling packages: jq/c6a6daa7f64fc4775d11c0d4441d9fcf49506746
Task 273779 | 21:54:35 | Compiling packages: nsx-cni/a136d3bfda53c9ee66d5df14363ec14fd0c57b9a (00:01:37)
Task 273779 | 21:54:35 | Compiling packages: ncp_rootfs/3ece5d549c81eab2a05cf321f539aa6e10246af9
Task 273779 | 21:54:47 | Compiling packages: nsx-cni-common/9dbd749995b475d3ae3bb5b4c7579035bca73f44 (00:01:49)
Task 273779 | 21:54:47 | Compiling packages: jq/c6a6daa7f64fc4775d11c0d4441d9fcf49506746 (00:01:49)
Task 273779 | 21:55:42 | Compiling packages: ncp_rootfs/3ece5d549c81eab2a05cf321f539aa6e10246af9 (00:01:07)
Task 273779 | 21:57:44 | Compiling packages: nsx-python27/75df9f63298d0d2644c6030b160b9b7486a9c195 (00:04:46)
Task 273779 | 21:57:44 | Compiling packages: openvswitch/b7de8ce17aa0c74b730aba66993ab1db4cf98ccd (00:03:00)
Task 273779 | 22:01:20 | Updating instance master: master/d0b5fb1c-d0d2-464e-885c-25e4e14e51fa (0) (canary)
...

Wait until the K8s upgrade finished successfully and check the results.

➜  ~ pks clusters

PKS Version     Name    k8s Version  Plan Name  UUID                                  Status     Action
1.6.0-build.17  k8scl1  1.15.5       small      c9dbee0e-41c0-4fef-8dfe-12e98b46843b  succeeded  UPGRADE

➜  ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Conclusion

Upgrading Enterprise PKS is very simple, fully automated, and with the “pks upgrade-cluster” command, you have more flexibility for planning as well as scheduling your K8s cluster upgrades. However, you need to be aware that you won’t be able to execute some PKS operations on the K8s clusters until you have upgraded the cluster as well. The process of upgrading PKS is very mature and has not changed much over the past PKS versions. Overall, straightforward and very useful to keep up with the fast-moving K8s community, respectively, new K8s releases.

Sources

Posted in PKS

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