Files for this Scenario
|7.0.2||Download from GitHub|
Kubernetes is an open-source system for deploying and managing containerized applications within a hybrid or cloud environment. Using the Embotics® vCommander® cloud management platform, you can deploy applications into Kubernetes clusters.
This guide shows you how to use vCommander to deploy a new application into an existing Kubernetes cluster. The requester chooses from a preconfigured list of applications (our example includes nginx, mongo and redis). The required manifest files are embedded in a completion workflow step. An optional approval workflow can be added to check the files before deploying, but an approval process is arguably less necessary, since requesters must choose from a fixed list of applications.
This guide is intended for systems administrators, engineers and IT professionals. Previous experience with Kubernetes is required.
Before you begin, you must add a Kubernetes cluster as a cloud account (managed system). You can do this in one of two ways:
- Add an existing Kubernetes cluster as a vCommander cloud account (managed system). See Adding a Kubernetes Cloud Account (Managed System).
- Create a new Kubernetes cluster through vCommander and have it automatically added as a vCommander cloud account (managed system). To learn how, search for "Kubernetes" in this Knowledge Base and choose the article for your preferred platform for deploying Kubernetes clusters.
Install the plug-in step package
This scenario uses the Kubernetes plug-in workflow step package (
wfplugins-k8s.jar), which provides a plug-in workflow step to add the deployed Kubernetes cluster to vCommander’s inventory as a cloud account (managed system). The completion workflow in this scenario reference this plug-in step.
Go to Embotics GitHub / Plug-in Workflow-Steps and clone or download the repository. Then in your local version of the repo, browse to the
k8s directory, which contains the Kubernetes plug-in workflow step package.
For information on how to download and install workflow plug-in steps, see Adding plug-in workflow steps.
Import the completion workflows
- Go to Embotics Git Hub / Scenarios and clone or download the repository.
- In vCommander, go to Configuration > Service Request Configuration > Completion Workflows and click Import.
- Go to the Scenarios repo that you cloned or downloaded, then from the
Enable-Requesters-to-Choose-Apps-to-Deploy-on-Kubernetes-Clusterdirectory, select the
Deploy_specific_apps_on_K8s.yaml or .json file, and click Open.
vCommander automatically validates the workflow and displays the validation results in the Messages area of the Import Workflow dialog.
- Enter a comment about the workflow in the Description of Changes field, and click Import.
To learn more, see Importing and Exporting Workflows in the vCommander User Guide.
Create a custom attribute
You must create a custom attribute to enable requesters to choose from a preconfigured list of applications to install.
The completion workflow includes manifest files for nginx, mongo and redis. You can customize the completion workflow with your own applications and manifest files; if you do so, then you must add custom attribute values that match the application names.
Create a list-type custom attribute named “Application to Install” with the following values:
To learn more about custom attributes, see Using Custom Attributes to Add Infrastructure Metadata.
Configure the change request form
- Create a change request form named “Install Apps”.
- From the Completion Workflow list, select Deploy specific apps on K8s.
- Click OK.
- In the Toolbox, click Custom Attribute.
- The Custom Attribute form element appears on the form. In the Custom Attribute list, select Application to Install.
- Remove any unneeded form elements.
- Click Save.
Configure the completion workflow (optional)
The completion workflow you imported includes manifest files for nginx, mongo and redis. You can customize the completion workflow with your own applications and manifest files; if you do so, you must also add custom attribute values that match these application names.
- Select the imported workflow in the Completion Workflows list and click Edit.
- On the Steps page, click Add > Kubernetes > Kubernetes Deploy Resource.
- For Step Name, enter a name that indicates the application to be deployed.
- For Namespace, enter the namespace where the application will be deployed.
- In K8s YAML manifest, paste the contents of a YAML manifest file for this application.
- For Deploy Type, change the default setting, Create or Update, if needed.
- Add more Kubernetes Add to Inventory steps for additional applications as required.
- Click Next, Next and Finish.
Submit a change request
- In vCommander, select a Kubernetes cloud account (managed system) and run the Request Change command.
- In the Select Change Request dialog, click Install Apps.
- Complete the request form by selecting an application to install and click OK.
The chosen application is installed on the selected Kubernetes cluster.