Deployment of Workspace Platform Applications

Deploy platform applications to attached clusters using the CLI

This topic describes how to use the CLI to enable an application to deploy to attached clusters within a workspace. To use the DKP UI to enable applications, see Customize a workspace’s applications.

See Workspace Platform Applications for a list of all applications and those that are enabled by default.

Prerequisites

Before you begin, you must have:

Set the WORKSPACE_NAMESPACE environment variable to the name of the workspace’s namespace where the cluster is attached:

export WORKSPACE_NAMESPACE=<workspace_namespace>

IMPORTANT: From the CLI, you can enable applications to deploy in the workspace. Verify that an application has successfully deployed via the CLI.

Enable the application

Review the list of available applications that can be enabled to deploy to your attached cluster.

  1. Enable a supported application to deploy to your existing attached cluster with an AppDeployment resource.

  2. Within the AppDeployment, define the appRef to specify which App will be enabled:

    cat <<EOF | kubectl apply -f -
    apiVersion: apps.kommander.d2iq.io/v1alpha2
    kind: AppDeployment
    metadata:
      name: istio
      namespace: ${WORKSPACE_NAMESPACE}
    spec:
      appRef:
        name: istio-1.11.6
        kind: ClusterApp
    EOF
    
  3. Create the resource in the workspace you just created, which instructs Kommander to deploy the AppDeployment to the KommanderClusters in the same workspace.

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

Enable an application with a custom configuration

  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: istio
      namespace: ${WORKSPACE_NAMESPACE}
    spec:
      appRef:
        name: istio-1.11.6
        kind: ClusterApp
      configOverrides:
        name: istio-overrides-attached
    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: ${WORKSPACE_NAMESPACE}
      name: istio-overrides-attached
    data:
      values.yaml: |
        operator:
          resources:
            limits:
              cpu: 200m
              memory: 256Mi
            requests:
              cpu: 50m
              memory: 128Mi
    EOF
    

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

Verify applications

The applications are now enabled. Connect to the attached cluster and check the HelmReleases to verify the deployment:

kubectl get helmreleases istio -n ${WORKSPACE_NAMESPACE} -w

You should eventually see the HelmRelease marked as Ready:

NAMESPACE               NAME        READY   STATUS                             AGE
workspace-test-vjsfq    istio       True    Release reconciliation succeeded   7m3s

NOTE: Some of the supported applications have dependencies on other applications. See Workspace Platform Application Dependencies for that table.