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:
dkp get workspaces
CODEAnd copy the values under the
NAME
andNAMESPACE
columns for your workspace.Export the
WORKSPACE_NAME
variable:export WORKSPACE_NAME=<WORKSPACE_NAME>
CODEExport the
WORKSPACE_NAMESPACE
variable:export WORKSPACE_NAMESPACE=<WORKSPACE_NAMESPACE>
CODEEnsure 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}
CODEYou 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.)kubectl get helmreleases -n ${WORKSPACE_NAMESPACE}
CODECopy 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.9 --workspace ${WORKSPACE_NAME} dkp create appdeployment rook-ceph --app rook-ceph-1.10.3 --workspace ${WORKSPACE_NAME} dkp create appdeployment rook-ceph-cluster --app rook-ceph-cluster-1.10.3 --workspace ${WORKSPACE_NAME} dkp create appdeployment grafana-loki --app grafana-loki-0.48.6 --workspace ${WORKSPACE_NAME} dkp create appdeployment grafana-logging --app grafana-logging-6.38.1 --workspace ${WORKSPACE_NAME}
CODE
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 Rook Ceph Cluster with sufficient storage space. Enabling admin logs via Fluent Bit may use around 2GB/day per node. See Rook Ceph in DKP for more details on how to configure the Rook Ceph Cluster.
To install Fluent Bit, create the AppDeployment:
dkp create appdeployment fluent-bit --app fluent-bit-0.20.9 --workspace ${WORKSPACE_NAME}