This vRealize Code Stream plugin automates CI/CD operations with Kubernetes. This plugin supports operations on Kubernetes objects including Namespace, Deployment, Pod, Replica Set, Replication Controller, Services and Secrets. It also helps perform upgrades of container images. The aim of this open source plugin is to release new capabilities faster and also allow anyone to modify it for their own purposes and to be able to contribute back to the larger vRealize Code Stream community.
Compatibility with vRealize Code Stream Versions
vRealize Code Stream 2.2, vRealize Code Stream 2.3, vRealize Code Stream 2.4
Compatibility with Kubernetes Versions
Kubernetes 1.5, 1.6, 1.7, 1.8, 1.9
- A Kubernetes Cluster is already deployed.
- Kubernetes cluster's kubeconfig file.
- A development machine running on Microsoft Windows, Apple Mac OS X or Linux.
- A development appliance of vRealize Code Stream installed in your environment (Recommended).
- JDK 8
- Maven 3.1.1+
Build & Run
Setting Environment to build the plugin
- Clone vRealize Code Stream Plug-In SDK (https://github.com/vmwaresamples/vrcs-sdk-samples.git) in your development machine.
- Go to the directory /lib from the root of the repository vrcs-sdk-samples and build using mvn clean install.
- Go back to the root and build using mvn clean install.
Building the plugin
- Clone this repository to the same development machine where above steps where performed.
- Go under the directory fms-bundle-kubernetes and build using mvn clean install.
- Go to the target/ directory under root and copy the fms-bundle-kubernetes-2.0.2.zip to VRCS_APPLIANCE_HOST:/var/lib/codestrem/plugins/
- Unzip the zip file and restart the vcac-server service. (It will take 10-15 minutes for all the service to start. You can check VRBC_INSTANCE_URL:5480).
- Create/Delete Deployment
- Create/Delete ReplicaSet
- Create/Delete Replication Controller
- Create/Delete Pod
- Create/Delete Namespace
- Create/Delete Service
- Create/Delete Persistent Volume
- Create/Delete Persistent Volume Claim
- Create/Delete Secrets
- Update of image versions in a deployment
The codestream-kubernetes-plugin project team welcomes contributions from the community. Before you start working with codestream-kubernetes-plugin, please read our Developer Certificate of Origin. All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. For more detailed information, refer to CONTRIBUTING.md.
NOTE: This plugin uses backward compatibilty of deployment and replicaset. Please give API version for deployment and replicaset as 'extention/v1beta1'.
Example yaml file:
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80