Create AppDeployments to Enable Workspace Logging
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:
Execute the following command to get the name and namespace of your workspace:
CODEdkp get workspaces
And copy the values under the
NAME
andNAMESPACE
columns for your workspace.Export the
WORKSPACE_NAME
variable:CODEexport WORKSPACE_NAME=<WORKSPACE_NAME>
Export the
WORKSPACE_NAMESPACE
variable:CODEexport WORKSPACE_NAMESPACE=<WORKSPACE_NAMESPACE>
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:
CODEdkp get appdeployments --workspace ${WORKSPACE_NAME}
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 followingkubectl
command.)CODEkubectl get helmreleases -n ${WORKSPACE_NAMESPACE}
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:
CODEdkp 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.