Deploying Kubernetes Apps in Platform9 Managed Kubernetes

Kubernetes applications are applications packaged as Helm Charts (Charts). Helm Charts can be shared and stored in a Chart repository. Platform9 Managed Kubernetes includes the stable, incubator, and Fission repositories, by default. The repositories constitute the application catalog.

Prerequisites

The following prerequisites must be satisfied before you can deploy a Chart or an application from an application catalog in Platform9 Managed Kubernetes.

  • Add a Kubernetes cluster (cluster) with application catalog enabled on the cluster. This is the cluster on which you would to deploy the Chart.
    Note: You cannot enable the application catalog on existing clusters. 
  • Ensure that the repository with the application catalog containing the Chart to deploy is present in Platform9 Managed Kubernetes. If the repository is not already present in Platform9 Managed Kubernetes, you must first add the repository to Platform9 Managed Kubernetes.
  • Optionally, define a storage class if the app or Chart requires persistent storage. For example, a database app.

Let us look at each of the prerequisites in detail.

Note: It is assumed that you are logged in to the Platform9 Clarity UI.

Add Cluster

You can add a cluster through the Platform9 Clarity UI. When you add the cluster, you must enable application catalog in the advanced configuration of the cluster creation process.

Follow the steps given below to add a cluster with application catalog enabled on the cluster.

  1. Navigate to Infrastructure and click Add Cluster to add a new cluster.
  2. Configure the cluster per your requirement and click Next to move further in the cluster configuration. At step 4, select the Enable Application Catalog check box to enable application catalog.

When a new cluster is added successfully, it has the stable, incubator, and Fission repositories, by default. You can add other repositories to the cluster, if required.

Add Repository

A repository points to a Helm Chart store (Chart store) that contains Kubernetes apps.

When you add a Chart repository, you must name the repository, specify the URL that points to the Chart store, and the URL that points to the source code of the Chart store.

Follow the steps given below to add a repository.

  1. Navigate to the Repositories tab under App Catalog, and click Add Repository.
  2. Enter the name, URL and source for the repository. Click Next.
  3. Optionally, select a cluster to which you want to add the repository.
  4. Click Add.

The repository is added.

Add Storage Class

You can create a new storage class on a specific cluster by specifying the storage type that maps to the cloud provider for that cluster. This storage class can be used to deploy applications that require persistent storage.

Follow the steps given in Add Storage Class section in Working with Storage Classes in Platform9 Managed Kubernetes to add a new storage class.

The newly added storage class can be used for persistent storage, by the cluster running the application.

Deploy Application

Follow the steps given below to deploy an application.

  1. Navigate to the App Catalog tab under App Catalog.
  2. Click Deploy on the application to deploy from the application catalog.
  3. Enter the name of the application, select the namespace to deploy the application and select the application version. Then click Deploy.
  4. Navigate to the Deployed Apps tab under App Catalog, to check if the app has been deployed successfully.

    Alternatively, you can run either of the commands given below, on the command line, to check if the app has been deployed successfully.
    [code lang=”bash”]kubectl get pods
    helm ls[/code]

You cannot edit the parameters of the Chart through the Platform9 Clarity UI. If you want to edit the Chart’s parameters with custom values, you must use the Helm client.

For example, the Jenkins Chart from the stable repository supports several parameters, including Agent.Cpu (default value = 200m) and Agent.Memory (default value = 256Mi). If you want to change these parameters, invoke the Helm client as follows.
[code lang=”bash”]helm install –name my-jenkins-app –set Agent.Cpu=500m,Agent.Memory=512Mi stable/jenkins[/code]

Check the README document for the Chart you want to deploy, to get the list of customizable parameters.

The browser you are using is outdated. For the best experience please download or update your browser to one of the following:

Leaving VMware? Get the VMware alternatives guideDownload now