Deploy a Custom Application from the Project Catalog

Deploy a Custom Application from the Project Catalog

After creating a GitRepository, you can either use the Kommander UI or the CLI to deploy your custom applications.

Deploy the application using the Kommander UI

Go to the Kommander UI to deploy your custom applications:

  1. Select Workspace > Project

  2. Select your project from the list.

  3. Select Applications on the top navigation bar to browse the available applications from your configured repositories.

  4. Select your desired application.

  5. Select the version you’d like to deploy from the version drop-down, and then select Deploy. The Deploy Project Custom Application page is displayed.

  6. (Optional) If you want to override the default configuration values, copy your values content into the text editor under Configure Service or just upload your yaml file that contains the values:

    someField: someValue
    
  7. Once you confirm the details are correct, click the Deploy button.

For all applications, you must provide a display name and an ID which is automatically generated based on what you enter for the display name, unless or until you edit the ID directly. The ID must be compliant with Kubernetes DNS subdomain name validation rules.

Alternately, you can use the CLI to deploy your custom applications.

Deploy the application using the CLI

  1. Set the PROJECT_NAMESPACE environment variable to the name of the project’s namespace:

    export PROJECT_NAMESPACE=<project_namespace>
    
  2. Get the list of available applications to deploy using the following command:

    kubectl get apps -n ${PROJECT_NAMESPACE}
    
  3. Deploy one of the supported applications from the list with an AppDeployment resource.

  4. Within the AppDeployment, define the appRef to specify which App will be deployed:

    cat <<EOF | kubectl apply -f -
    apiVersion: apps.kommander.d2iq.io/v1alpha2
    kind: AppDeployment
    metadata:
      name: my-custom-app
      namespace: ${PROJECT_NAMESPACE}
    spec:
      appRef:
        name: custom-app-0.0.1
        kind: App
    EOF
    
    

NOTE: The appRef.name must match the app name from the list of available applications.

Deploy an application with a custom configuration using the CLI

  1. Provide the name of a ConfigMap in the AppDeployment, which provides custom configuration on top of the default configuration:

    cat <<EOF | kubectl apply -f -
    apiVersion: apps.kommander.d2iq.io/v1alpha2
    kind: AppDeployment
    metadata:
      name: my-custom-app
      namespace: ${PROJECT_NAMESPACE}
    spec:
      appRef:
        name: custom-app-0.0.1
        kind: App
      configOverrides:
        name: my-custom-app-overrides
    EOF
    
  2. Create the ConfigMap with the name provided in the step above, with the custom configuration:

    cat <<EOF | kubectl apply -f -
    apiVersion: v1
    kind: ConfigMap
    metadata:
      namespace: ${PROJECT_NAMESPACE}
      name: my-custom-app-overrides
    data:
      values.yaml: |
        someField: someValue
    EOF
    

Kommander waits for the ConfigMap to be present before deploying the AppDeployment to the attached clusters in the Project.

Verify applications

After completing the previous steps, your applications are deployed. Connect to the attached cluster and check the HelmReleases to verify the deployments:

kubectl get helmreleases -n ${PROJECT_NAMESPACE}

NAMESPACE               NAME            READY   STATUS                             AGE
project-test-vjsfq      my-custom-app   True    Release reconciliation succeeded   7m3s