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-4.2.3 --workspace ${WORKSPACE_NAME} dkp create appdeployment rook-ceph --app rook-ceph-1.11.9 --workspace ${WORKSPACE_NAME} dkp create appdeployment rook-ceph-cluster --app rook-ceph-cluster-1.11.9 --workspace ${WORKSPACE_NAME} dkp create appdeployment grafana-loki --app grafana-loki-0.69.16 --workspace ${WORKSPACE_NAME} dkp create appdeployment grafana-logging --app grafana-logging-6.57.4 --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 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.34.1 --workspace ${WORKSPACE_NAME}