이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Verifying cluster prerequisites for logging
Before you install the Loki Operator or Red Hat OpenShift Logging Operator, verify that your cluster meets both storage requirements for LokiStack. Missing either storage prerequisite is a common cause of silent deployment failures.
LokiStack requires TWO separate types of storage:
- Block storage (via StorageClass): For internal PVCs that store the write-ahead log (WAL), index cache, and compactor working space
- Object storage (S3-compatible): For the actual log data chunks and indices
This section covers the first requirement (block storage). Object storage is configured separately in Configuring object storage for LokiStack.
Both storage types are mandatory. Missing either causes deployment failure.
2.1. Why verify prerequisites first 링크 복사링크가 클립보드에 복사되었습니다!
Without a working StorageClass:
- Operators install successfully.
-
The
LokiStackshowsReady. -
Pods remain
Pendingand no logs are collected or stored.
Without object storage or a proper CA bundle:
- Operators install successfully.
-
The
LokiStackshowsReady. - Logs are silently dropped with no user-facing error.
Complete these checks now to prevent troubleshooting issues later. See KCS-7062821 for examples of support cases caused by unclear storage requirements.
2.2. Object storage permissions requirements 링크 복사링크가 클립보드에 복사되었습니다!
The credentials used to access S3-compatible object storage must have specific permissions to allow LokiStack to read, write, and manage log data.
2.2.1. Required S3 API permissions 링크 복사링크가 클립보드에 복사되었습니다!
The following S3 API permissions are required for LokiStack to function correctly:
| Permission | Purpose |
|---|---|
|
| List objects in the bucket. Required for LokiStack to query and retrieve stored log chunks. |
|
| Write log chunks and index files to the bucket. Required for log ingestion. |
|
| Read log chunks and index files from the bucket. Required for log queries and compaction. |
|
| Delete expired log chunks based on retention policies. Required for the compactor component. |
|
| Read object tags. Required for retention and lifecycle management. |
|
| Write object tags. Required for retention and lifecycle management. |
Without s3:DeleteObject permission, the LokiStack compactor cannot remove expired logs. This causes the bucket to grow indefinitely, even when retention policies are configured. The LokiStack shows Ready but old logs are never deleted.
2.2.2. Example IAM policy for AWS S3 링크 복사링크가 클립보드에 복사되었습니다!
If using Amazon S3, create an IAM policy with the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::<bucket_name>"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:GetObjectTagging",
"s3:PutObjectTagging"
],
"Resource": "arn:aws:s3:::<bucket_name>/*"
}
]
}
Replace <bucket_name> with your actual S3 bucket name.
2.2.3. Permissions for S3 Compatible storage 링크 복사링크가 클립보드에 복사되었습니다!
For S3 Compatible storage providers (NetApp StorageGRID, Cloudian HyperStore, and others), ensure the access credentials have equivalent permissions to the S3 API operations listed above. The exact configuration method varies by storage provider.
Consult your storage provider’s documentation for:
- How to create users or service accounts
- How to grant S3 API permissions to those accounts
- Whether additional permissions are required for your specific storage implementation
Some S3 Compatible storage providers use different permission models or naming conventions. Verify that your credentials can perform all six S3 operations listed above.
2.3. Verifying StorageClass availability 링크 복사링크가 클립보드에 복사되었습니다!
LokiStack requires a StorageClass that supports dynamic provisioning of block storage (ReadWriteOnce). The StorageClass does not need to be the default, but it must have sufficient available capacity for your chosen LokiStack size.
Prerequisites
- You have cluster administrator permissions.
-
You are logged in to the cluster with
oc.
Procedure
List available
StorageClassresources:$ oc get storageclassIdentify the
StorageClassyou will use for LokiStack. It can be the defaultStorageClass(marked with(default)) or any other availableStorageClass:$ oc get storageclass -o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}'Verify the
StorageClasssupports block storage (strongly recommended for Loki performance):Look for a provisioner such as
ebs.csi.aws.com,csi.vsphere.vmware.com,openshift-storage.ceph.rbd, or similar.ImportantLoki supports both block and filesystem storage, but filesystem storage introduces significant performance issues and is not recommended for production deployments. Always use block storage (
volumeMode: Block) when available.Verify the
StorageClasshas sufficient available capacity:Check the disk space requirements from the Loki sizing table. For example,
1x.mediumwith ruler requires 910 GiB of total disk capacity across all PVCs.
If no suitable StorageClass exists, LokiStack PVCs remain Pending and pods never start. You must configure a StorageClass before installing the operators. If you do not want to use the default StorageClass, you can specify storageClassName explicitly in the LokiStack CR.
Next step
If you are on single-node OpenShift or an edge deployment without dynamic storage, configure local storage for single-node and edge deployments.
2.4. Configuring local storage for single-node and edge deployments 링크 복사링크가 클립보드에 복사되었습니다!
Single-node OpenShift and many edge deployments do not include a StorageClass. Use the Local Storage Operator or Logical Volume Manager Storage to create one from local disks.
Prerequisites
- You have cluster administrator permissions.
- Raw, unformatted block devices are available on the node(s).
- The cluster is not using OpenShift Data Foundation (consider OpenShift Data Foundation for larger environments).
Procedure
Create the project, if it does not exist, by running the following command:
$ oc adm new-project openshift-local-storage-
Install the Local Storage Operator from OperatorHub (Web Console) or via Subscription YAML. Use the
stablechannel. Create a
LocalVolumeCR for block devices (recommended for Loki):Example:
localvolume-block.yamlapiVersion: local.storage.openshift.io/v1 kind: LocalVolume metadata: name: local-block namespace: openshift-local-storage spec: nodeSelector: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - <your_node_name> storageClassDevices: - storageClassName: local-block volumeMode: Block devicePaths: - /dev/disk/by-id/<device_id> fsType: ""<your_node_name>- Replace with your node name or use node labels for selection.
storageClassName: local-block-
This value becomes your new
StorageClassname. <device_id>-
Use stable
by-idpaths for device identification.
Apply it by running the following command:
$ oc apply -f localvolume-block.yamlVerify the new
StorageClassby running the following command:$ oc get storageclass local-block-
Optional: Make it the default
StorageClass.
Verification
After the LokiStack is created, check that PVCs bind by running the following command:
$ oc get pvc -n openshift-logging