Files for this Scenario
|7.0.x||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 run a best practices report that compares the current state of a Kubernetes cluster against a set of checks to ensure that the resources (such as pods and containers) deployed on the cluster follow best practices and corporate standards.
This article shows you how to use vCommander 7.0+ to run a best practices report as a command workflow against a Kubernetes cluster. The best practices report is based on best practices documented by Kubernetes related to configuration, security, and large clusters, as well as on our own experience with Kubernetes.
This article 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" on our Knowledge Base and choose the article for your preferred platform for deploying Kubernetes clusters.
Install the plug-in steps
Go to the Embotics GitHub repository located at https://github.com/Embotics/Plug-in-Workflow-Steps and download the following workflow plug-in step packages:
Install the workflow plug-in step packages. To learn how, see Using Plug-In Workflow Steps.
Import the command workflow
- Download the command workflow “K8s best practices” from the Embotics GitHub repository located at https://github.com/Embotics/Scenarios.
- In vCommander, go to Configuration > Command Workflows and click Import.
- Browse to the .yaml file you downloaded and click Open.
vCommander automatically validates the workflow.
- Click Import.
To learn more, see Importing and Exporting Workflows.
Optional: Customize the rules and their thresholds
To customize the set of rules and their thresholds used by the best practices report:
- Download the defaultBestPracticesRulesFile.yaml configuration file from the Embotics GitHub repository located at https://github.com/Embotics/Scenarios.
- Edit the rules and their thresholds as required.
- Save the file to a known location on the vCommander server.
Configure the command workflow
- Select the K8s best practices workflow in the Command Workflows list and click Edit.
- Navigate to the Steps page.
- Run Best Practices Checks workflow step: This step runs the checks against the selected Kubernetes cluster.
- Rules File: If you customized the rules and thresholds in the .yaml configuration file, enter the absolute path to the file on the vCommander server, for example, C:\temp\mybestpractices.workflow.yaml. If no file is specified, the default set of rules is used.
- XSLT Transform step: This step processes the output of the previous step.
- Output: Specify an absolute path for the output file. The specified directory must already exist.
- Stylesheet: Specify the absolute path to a stylesheet file on the vCommander server.
- Parameters: Adjust parameter values, such as the report title, as required.
- Email Attachment step: This step emails the output of the previous step.
- To: Enter one or more email addresses as required.
- Subject: Customize as required.
- Body: Customize as required.
- Click Next and Finish.
Run the command workflow
- Select a Kubernetes cluster in the Operational or Deployed view.
- Right-click and select Run Workflow.
- In the Select a Workflow dialog, select the workflow and click Run.
The report is generated and emailed to recipients.