Kovair DevOps Kubernetes Integration Plugin

Kubernetes Plugin Details

Plugin Version: 1.0
Last Update on: February 27, 2020

Overview

Kubernetes (commonly stylized a K8s) is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation. It aims to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”. It works with a range of container tools, including Docker. Many cloud services offer a Kubernetes-based platform or infrastructure as a service (PaaS or IaaS) on which Kubernetes can be deployed as a platform-providing service. Many vendors also provide their own branded Kubernetes distributions.

This plug-in has been designed to manage Kubernetes Cluster from Kovair DevOps platform.

Kubernetes Information:

More information can be found at Kubernetes

Version Supported:

This plugin was developed and tested against Kubernetes v.1.17

Plugin Operations:

  1. DeployFile
This operation deploys a file in Kubernetes Cluster.

Input parameter(s):

Parameter Is Mandatory Help Text
File Name true Provide the name of the file to be created along with file extension. For Kubernetes, it makes sense to deploy a JSON or a YAML file.
Deployment Location true Provide the location in the system where Agent Service is running and where the file will be deployed, this should start from Linux file system root (/). Please ensure necessary privileges of the user account in the provided path through which the Agent Service is running.
File Content true Provide the content of the file here.
Note: This operation has been provided to assist in file deployment in Kubernetes Master using basic Linux command. All the parameters are required for this operation.

Output parameter(s):

Parameter Help Text
Status Status of file deployment operation.
DeployedAt Location where file has been deployed. Value in this output parameter will be obtained only when deployment has been successful.
  1. DeleteFile
This operation deletes the specified file.

Input parameter(s):

Parameter Is Mandatory Help Text
File Path true Provide the complete path of the file starting from Linux file system root(/) with file extension.Please ensure necessary privileges of the user account in the provided path through which the Agent Service is running.

Output parameter(s):

Parameter Help Text
Status Status of file delete operation.
  1. CreateNamespace
This operation creates namespace in Kubernetes Cluster.

Input parameter(s):

Parameter Is Mandatory Help Text
Namespace Name false Provide the name of the namespace to be created in the cluster. Ensure following Kubernetes’s naming convention.
File Path false Provide the path of JSON/YAML file based on which new namespace will be created. The JSON/YAML file should be physically present in the system where command will be run.
Note: End user need to provide value for either ‘Namespace Name’ or ‘File Path’. If ‘Namespace Name’ is provided, then Namespace will be created based on the supplied value; if ‘File Path’ is provided, the Namespace will be created based on the template file whose path is provided. If both are provided, then ‘File Path’ parameter value will be considered.

Output parameter(s):

Parameter Help Text
Status Status of namespace create operation.
OutputLog Output log of the operation.
  1. CreateJob
This operation creates a normal/scheduled job in Kubernetes Cluster.

Input parameter(s):

Parameter Is Mandatory Help Text
Job Name false Provide the name of the job to be created.Ensure following Kubernetes’s naming convention.
Image Name false Provide the name of the Image to be used in job creation.
File Path false Provide the path of the JSON/YAML file in which the job is defined.Please ensure necessary privileges of the user account in the provided path through which the Agent Service is running.
Note: End user need to provide value for either ‘Job Name’ and ‘Image Name’ or ‘File Path’. If ‘Job Name’ and ‘Image Name’ are provided, then Job will be created based on the supplied values; if ‘File Path’ is provided, the Job will be created based on the template file whose path is provided. If all are provided, then ‘File Path’ parameter value will be considered.

Output parameter(s):

Parameter Help Text
Status Status of job creation operation.
OutputLog Output log of the operation.
  1. CheckJobStatus
This operation checks the status of the specified job.

Input parameter(s):

Parameter Is Mandatory Help Text
Job Name true Provide the name of the job whose status is to be checked.

Output parameter(s):

Parameter Help Text
Status Status of the operation.
OutputLog Output log of the operation.
  1. DeleteJob
This operation deletes the specified job.

Input parameter(s):

Parameter Is Mandatory Help Text
Job Name true Provide the name of the job which is to be deleted.

Output parameter(s):

Parameter Help Text
Status Status of job delete operation.
OutputLog Output log of the operation.
  1. CreateDeployment
Creates a deployment or job to manage the created container(s).

Input parameter(s):

Parameter Is Mandatory Help Text
Deployment Name false Provide the name of the deployment to be created.
Image Name false Provide the name of the image to be used while creating the deployment.
Other Optional Parameters false Provide other optional flags for creating a deployment. e.g.: Replicas / Environment Variables / Port etc. maintaining proper syntax.
File Path false Provide the path of JSON/YAML file based on which new deployment will be created. Please ensure necessary privileges of the user account in the provided path through which the Agent Service is running.
Note: End user need to provide value for either ‘Deployment Name’ and ‘Image Name’ together or ‘File Path’ alone. If ‘Deployment Name’ and ‘Image Name’ are provided, then Deployment will be created based on the supplied values; if ‘File Path’ is provided, then Deployment will be created based on the template file whose path is provided. The parameter ‘Other Optional Parametes’ may be kept blank and if value is provided for it, then it will be considered only if user provides values for ‘Deployment Name’ and ‘Image Name’. However, if user provides values for ‘Deployment Name’, ‘Image Name’ as well as for ‘File Path’, then ‘File Path’ value will not be considered and deployment will be made based on values of ‘Deployment Name’ and ‘Image Name’ and ‘Other Optional Parameters’ (if present).

Output parameter(s):

Parameter Help Text
Status Status of deployment operation.
OutputLog Output log of the operation.
  1. ExecuteGenericCommand
This operation executes the supplied command in Kubernetes Cluster.

Input parameter(s):

Parameter Is Mandatory Help Text
Command true Provide the command here.

Output parameter(s):

Parameter Help Text
Status Status of the execution of command.
OutputLog Output log of the operation.

Pass/Fail Conditions:

Status Condition Method
Passed If ‘OutputLog’ is empty. DeployFile / DeleteFile
Failed If ‘OutputLog’ is not empty. DeployFile / DeleteFile
Passed If ‘OutputLog’ contains the word ‘created’. CreateNamespace / CreateJob / CreateDeployment
Failed If ‘OutputLog’ does not contain the word ‘created’. CreateNamespace / CreateJob / CreateDeployment
Passed If ‘OutputLog’ contains the word ‘deleted’. DeleteJob
Failed If ‘OutputLog’ does not contain the word ‘deleted’. DeleteJob
Passed If ‘OutputLog’ does not contain the word ‘not found’. CheckJobStatus
Failed If ‘OutputLog’ contains the word ‘not found’. CheckJobStatus
Passed If ‘OutputLog’ does not contain the word ‘error’. ExecuteGenericCommand
Failed If ‘OutputLog’ contains the word ‘error’. ExecuteGenericCommand

Limitations:

  1. This plugin will work in Linux environment.
  2. Kubernetes API Server & Kubernetes Command Line Interface (kubectl) must be installed in the Kubernetes Cluster.
  3. The functionality solely depends on Kubernetes Command Line Interface, if the command behaviour changes the result may vary.

Release Details:

Kubernetes: 1.0
Initial version with basic functionalities.

Contact us:

    Yes, I accept the Privacy Statement and want to receive latest information from Kovair.