Kubernetes

Kovair DevOps Kubernetes Integration Plugin

Kubernetes
Listen to this article

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):

ParameterIs MandatoryHelp Text
File NametrueProvide 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 LocationtrueProvide 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 ContenttrueProvide 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):

ParameterHelp Text
StatusStatus of file deployment operation.
DeployedAtLocation 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):

ParameterIs MandatoryHelp Text
File PathtrueProvide 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):

ParameterHelp Text
StatusStatus of file delete operation.
  1. CreateNamespace

This operation creates namespace in Kubernetes Cluster.

Input parameter(s):

ParameterIs MandatoryHelp Text
Namespace NamefalseProvide the name of the namespace to be created in the cluster. Ensure following Kubernetes’s naming convention.
File PathfalseProvide 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):

ParameterHelp Text
StatusStatus of namespace create operation.
OutputLogOutput log of the operation.
  1. CreateJob

This operation creates a normal/scheduled job in Kubernetes Cluster.

Input parameter(s):

ParameterIs MandatoryHelp Text
Job NamefalseProvide the name of the job to be created.Ensure following Kubernetes’s naming convention.
Image NamefalseProvide the name of the Image to be used in job creation.
File PathfalseProvide 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):

ParameterHelp Text
StatusStatus of job creation operation.
OutputLogOutput log of the operation.
  1. CheckJobStatus

This operation checks the status of the specified job.

Input parameter(s):

ParameterIs MandatoryHelp Text
Job NametrueProvide the name of the job whose status is to be checked.

Output parameter(s):

ParameterHelp Text
StatusStatus of the operation.
OutputLogOutput log of the operation.
  1. DeleteJob

This operation deletes the specified job.

Input parameter(s):

ParameterIs MandatoryHelp Text
Job NametrueProvide the name of the job which is to be deleted.

Output parameter(s):

ParameterHelp Text
StatusStatus of job delete operation.
OutputLogOutput log of the operation.
  1. CreateDeployment

Creates a deployment or job to manage the created container(s).

Input parameter(s):

ParameterIs MandatoryHelp Text
Deployment NamefalseProvide the name of the deployment to be created.
Image NamefalseProvide the name of the image to be used while creating the deployment.
Other Optional ParametersfalseProvide other optional flags for creating a deployment. e.g.: Replicas / Environment Variables / Port etc. maintaining proper syntax.
File PathfalseProvide 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):

ParameterHelp Text
StatusStatus of deployment operation.
OutputLogOutput log of the operation.
  1. ExecuteGenericCommand

This operation executes the supplied command in Kubernetes Cluster.

Input parameter(s):

ParameterIs MandatoryHelp Text
CommandtrueProvide the command here.

Output parameter(s):

ParameterHelp Text
StatusStatus of the execution of command.
OutputLogOutput log of the operation.

Pass/Fail Conditions:

StatusConditionMethod
PassedIf ‘OutputLog’ is empty.DeployFile / DeleteFile
FailedIf ‘OutputLog’ is not empty.DeployFile / DeleteFile
PassedIf ‘OutputLog’ contains the word ‘created’.CreateNamespace / CreateJob / CreateDeployment
FailedIf ‘OutputLog’ does not contain the word ‘created’.CreateNamespace / CreateJob / CreateDeployment
PassedIf ‘OutputLog’ contains the word ‘deleted’.DeleteJob
FailedIf ‘OutputLog’ does not contain the word ‘deleted’.DeleteJob
PassedIf ‘OutputLog’ does not contain the word ‘not found’.CheckJobStatus
FailedIf ‘OutputLog’ contains the word ‘not found’.CheckJobStatus
PassedIf ‘OutputLog’ does not contain the word ‘error’.ExecuteGenericCommand
FailedIf ‘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.

EnglishFrenchGermanItalianJapaneseSpanishChinese (Simplified)