Just Another IT Blog

It's time to share some of my experiences, crazy ideas, tips and tricks !!!

Post Page Advertisement [Top]

Finally, VMware Pivotal Container Service command line options series got to its end.
Featuring today PKS command line tool, allowing cloud admins to create, manage and delete kubernetes clusters within PKS.

Let's the fun begins

*** Installing PKS CLI ***
- Download PKS CLI tool from Pivotal Network;

obs: I'm focused on the Linux version, but it has a version for other platforms as well.


- Once transferred to your system make it executable;
Run: chmod +x pks-linux-amd64

- Move the pks cli to the bin directory;
Run: cp pks-linux-amd64 /usr/local/bin/pks

- You can test and check it’s version just running the command below;
Run: pks --version






*** Connecting to PKS *** 
Now that we have everything set up it's time to have some fun.

Let’s begin logging in to our PKS system:
Run: pks login -a “UAA_URL” -u “user_id” -p “password” -k

Obs: If you don’t know what the UAA_URL is or the user to connect to, go back and check the previous post.

*** Managing Kubernetes Cluster ***
- Creating kubernetes cluster;
Run: pks create-cluster “cluster_name” --external-hostname “address” --plan “plan_name”

Obs: external-hostname is the address from which to access the cluster Kubernetes API, also plans are part of Pivotal Container Service Tile.


- It's also easy to check all clusters in the system;
Run: pks clusters

- If you want to get a cluster's details;
Run: pks cluster “cluster_name”



- What about scaling out your cluster with a single command and the platform will take care of everything on your behalf
Run: pks resize “cluster_name” --num-nodes “X”

“X” means the number of desired worker nodes

- Finally you can delete your cluster when you don't need it anymore
Run: pks delete-cluster “cluster_name”

That’s all for the PKS command line series, now you are empowered with all the tools required to deliver and manager Kubernetes cluster at the speed and agility the business demands.

Bottom Ad [Post Page]