Files for this Scenario
|7.0.1||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 7.0+ 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 managed system. You can do this in one of two ways:
- Add an existing Kubernetes cluster as a vCommander managed system. See Adding a Kubernetes Managed System.
- Create a new Kubernetes cluster through vCommander and have it automatically added as a vCommander 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
- Go to the Embotics GitHub repository located at https://github.com/Embotics/Plug-in-Workflow-Steps and download the Kubernetes workflow plug-in step package, wfplugins-k8s.jar.
- Install the workflow plug-in step package. To learn how, see Adding Workflow Plug-In Steps.
Import the completion workflows
- Go to the Embotics GitHub repository located at https://github.com/Embotics/Scenarios and download the Deploy_specific_apps_on_K8s completion workflow definition.
- In vCommander, go to Configuration > Completion Workflows and click Import.
- Browse to the .yaml or .json file you downloaded and click Open.
- vCommander automatically validates the workflow. Click Import.
To learn more, see Importing and Exporting Workflows.
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.
In vCommander, 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 Add to Inventory.
- 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 the 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 or the Service Portal, select a Kubernetes managed system and run the Request Change command.
- In the Select Change Request dialog, click either Deploy K8s App or 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.