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 vSANenvironment. 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
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
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.
Change the permissions on the two files to include execute permissions.
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
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.
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
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:
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
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!
1 Comments
Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and time
ReplyDeleteKubernetes online training
Kubernetes online course