Kubernetes applications are packaged using Heml - a CNCF certified package manager that has become a de-facto open source standard for running and managing applications with Kubernetes. Applications are packaged as Helm Charts. Helm Charts let you define, install, and upgrade simple or complex Kubernetes applications. The Charts can be stored on disk, or fetched from remote chart repositories, and are easy to create, version, share and publish. See the Heml Hub for a list of publicly available charts.
PMK lets you leverage the public chart repositories by enabling helm package manager as a feature that you can turn on when you create a new PMK cluster.
Enabling Help App Catalog for a Cluster
When you create a cluster in PMK, you can enable application catalog as an option feature for the cluster. This can be done by clicking the checkbox for application catalog in the cluster creation wizard or by setting the parameter as part of the API / CLI call.
Follow the steps given below to enable application catalog for a cluster using PMK UI:
- Navigate to Infrastructure and click Add Cluster to add a new cluster.
- Configure the cluster per your requirement and at step 4, select the ‘Enable Application Catalog’ check box to enable application catalog.
When a new cluster is created successfully, helm is configured with stable, and incubator chart repositories, so you can easily start deploying charts from these repositories on your cluster. You can configure additional repositories to work with the cluster, if required.
Add a new Repository
- Navigate to the Repositories tab under App Catalog, and click ‘Add Repository’.
- Enter the name, URL and source for the repository. Click Next.
- Select a cluster to which you want to add the repository.
- Click Add.
The repository is now configured for that cluster.
Persistent Storage for Applications
Occassionally you will deploy helm charts that will require persistent storage. You can achieve this by creating a storage class for the cluster and then using it while deploying that application.
Installing Helm CLI
The Helm CLI (also called the Helm client) is a useful tool that lets you see the deployed applications on your cluster and install new applications, with the added option to customize values for input parameters.
Follow the instructions here for Heml CLI Install for your specific environment.
Deploying an Application
You can deploy a new instance of an application by following these steps:
- Navigate to ‘App Catalog’ menu option
- Under ‘App Catalog’, select the cluster on which you wish to deploy the application. Then select or search for the application to be deployed, then click ‘Deploy’.
- This will create a new instance of that application which will show up under the ‘Deployed Apps’ tab.
If you have the Helm CLI installed, you can also deploy an application using the CLI.
This example installs the ‘jenkins’ chart from the ‘stable’ repository using the default values for the input parameters.
You can also list all the applications that have been deployed by running the following command:
Deploying an Application with Custom Values
Several charts from the stable helm repository offer input parameters with curtomizable values. When deploying a chart using the PMK UI however, the chart always gets deployed with the default values for the input parameters (these are the defaults that the chart author configured it with during packaging time). You cannot edit these values through the PMK UI.
If you wish to deploy a chart with custom values for the input parameters, you must use the Helm CLI for this.
For example, the ‘jenkins’ chart from the ‘stable’ repository supports several input parameters, including Agent.Cpu (default value = 200m) and Agent.Memory (default value = 256Mi).
This example intalls the jenkins chart with custom values for these parameters:
Check the README document for the chart you want to deploy to get the full list of customizable parameters.