Introduction
A vCloud Director extension called CSE (Container Service Extension) has been released March 2018 in order to manage the life cycle of Kubernetes clusters for tenants. This extension has to be installed on a vCloud Director Instance by the service provider.
What can you do with CSE ?
It allows your customers to rapidly deploy, orchestrate and manage Kubernetes clusters, all on the intuitive an customizable vCD UI.
Indeed, Kubernetes clusters can be deployed in a multi-tenant modality in self-contained VM across a Distributed vSphere estate.
What are the benefits ?
IT teams are nowadays becoming increasingly DevOps-led. The need to deploy applications and services faster is one of the first concern for customers and Kubernetes is a fantastic tool for orchestrating dozens of microservices. But it still needs expertise and effort when it comes to scheduling, network configuration and updates.
With CSE, VMWare enable customers with an enterprise-ready managed Kubernetes stack, but also make it available within familiar virtual datacenter constructs.
CSE Architecture
CSE has a server component that installs as a vCD extension. It exposes REST API endpoint points via vCD. CSE also has a client component that plugs in vcd-cli, communicates with the CSE server via the exposed API endpoints, and facilitates vCD users to create Kubernetes clusters in vCD. The following diagram illustrates the interactions between the components.
Installation of CSE
There are basically 3 steps to be able to use CSE :
- The first thing you will have to do is to install Container Service Extension on the top of your vCloud Director environment. It can be downloaded on github and includes templates. (CSE Server in violet)
- Then you will have to configure and create a virtual datacenter on vCloud Director. (vCloud Director in blue)
- Finally, give access into the infrastructure to admins (CSE Client in pink)
Through the CSE client, we will be able to Create clusters, add nodes, delete nodes and clusters etc
Once that’s all set up you can hand that access over to your developpers (in green on the following image).
Create a K8S Cluster with VCD / CSE commands
Requirements :
- Install Python
- Install vcd-cli
- Install CSE Client
- Create Organization User with Admin Rights
- Create SSH Key
Here are the commands that will help you to install your K8 Cluster easily :
# /!\ Variables to change are between 2 "#" /!\
# Connect to vCloud Director via vcd-cli
vcd login #vcdProvider# #vcdTenant# #vcdUser#
# Choose Virtual Data Center
vcd vdc list
vcd vdc use #vcdVDC#
#List Available CSE Templates
vcd cse template list
# Deploy a Kubernetes Cluster (example 3 nodes and 1 master)
vcd cse cluster create #Cluster_name# \
--network #Network# \
--nodes #number_of_nodes#\
--memory #memory#\
--cpu #number_of_cpus#\
--template #ubuntu-16.04#\
--storage-profile #vCD-Storage-Policy#\
--ssh-key #~/.ssh/id_rsa.pub#
# Deploy additional Node to Kubernetes Cluster
vcd cse node create #Cluster_name# \
--network #Network# \
--nodes #number_of_nodes#\
--memory #memory#\
--cpu #number_of_cpus#\
--storage-profile #vCD-Storage-Policy#\
--ssh-key #~/.ssh/id_rsa.pub#
# Remove a node from Kubernetes Cluster
vcd cse node list #Cluster#
vcd cse node delete #Cluster_name node_name#
# Delete entire Kubernetes Cluster
vcd cse cluster delete #Cluster_name"
As you can see, it’s pretty simple and Open Source !
The goal is to to provide a simple way of deploying kubernetes clusters on top of vCloud Director and the allow any developper to focus on the application layer using his knowledge.
During last months, CSE has became more popular and I will hope new features will be implemented.
You can see easily that the project is frequently updated :
https://github.com/vmware/container-service-extension
You can find a great review on this website : https://cloud.tsugliani.fr/2018/03/vcloud-director-and-cse/
Source : vmware.com