How to create AppDeployments to enable Workspace-level logging

Workspace logging AppDeployments enable and deploy the logging stack to all attached clusters within the workspace. Use the DKP UI to enable the logging applications, or, alternately, use the CLI to create the AppDeployments.

To enable logging in DKP using the CLI, follow these steps on the management cluster:

  1. Execute the following command to get the name and namespace of your workspace:

    dkp get workspaces

    And copy the values under the NAME and NAMESPACE columns for your workspace.

  2. Export the WORKSPACE_NAME variable:

  3. Export the WORKSPACE_NAMESPACE variable:

  4. Ensure that Cert-Manager and Traefik are enabled in the workspace. If you want to find if the applications are enabled on the management cluster workspace, you can run:

    dkp get appdeployments --workspace ${WORKSPACE_NAME}
  5. You can confirm that the applications are deployed on the managed or attached cluster by running this kubectl command in that cluster. (Ensure you switch to the correct context or kubeconfig of the attached cluster for the following kubectl command.)

    kubectl get helmreleases -n ${WORKSPACE_NAMESPACE}
  6. Copy these commands and execute them on the management cluster from a command line to create the Logging-operator, Grafana-loki, and Grafana-logging AppDeployments:

    dkp create appdeployment logging-operator --app logging-operator-3.17.7 --workspace ${WORKSPACE_NAME}
    dkp create appdeployment minio-operator --app minio-operator-4.4.25 --workspace ${WORKSPACE_NAME}
    dkp create appdeployment grafana-loki --app grafana-loki-0.48.4 --workspace ${WORKSPACE_NAME}
    dkp create appdeployment grafana-logging --app grafana-logging-6.28.0 --workspace ${WORKSPACE_NAME} 

Then, you can verify the cluster logging stack installation.

To deploy the applications to selected clusters within the workspace, refer to the cluster-scoped configuration section.

We do not recommend installing Fluent Bit, which is responsible for collecting admin logs, unless you have configured the Grafana Loki Minio Tenant with sufficient storage space. Enabling admin logs via Fluent Bit may use around 2GB/day per node. See Release Notes 2.3.0 | Configuring-the-Grafana-Loki-Minio-Tenant for more details on how to configure the Minio Tenant.

To install Fluent Bit, create the AppDeployment:

dkp create appdeployment fluent-bit --app fluent-bit-0.19.21 --workspace ${WORKSPACE_NAME}

Only for Attached GKE Clusters:
Create a ResourceQuota to enable log collection

At this point, log collection is not enabled for your attached GKE cluster. Create a ResourceQuota to enable log collection.