You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== Forwarding logs to Amazon CloudWatch from STS enabled clusters
45
+
46
+
For clusters with AWS Security Token Service (STS) enabled, you can create an AWS service account manually or create a credentials request using the xref:../authentication/managing_cloud_provider_credentials/about-cloud-credential-operator.adoc[Cloud Credential Operator(CCO)] utility `ccoctl`.
47
+
48
+
.Prerequisites
49
+
50
+
* {logging-title-uc}: 5.5 and later
51
+
52
+
[NOTE]
53
+
====
54
+
This feature is not supported by the vector collector.
55
+
====
56
+
57
+
.Creating an AWS credentials request
58
+
. Create a `CredentialsRequest` Custom Resource YAML using the template below:
59
+
+
60
+
.CloudWatch Credentials Request Template
61
+
[source,yaml]
62
+
----
63
+
apiVersion: cloudcredential.openshift.io/v1
64
+
kind: CredentialsRequest
65
+
metadata:
66
+
name: <your_role_name>-credrequest
67
+
namespace: openshift-cloud-credential-operator
68
+
spec:
69
+
providerSpec:
70
+
apiVersion: cloudcredential.openshift.io/v1
71
+
kind: AWSProviderSpec
72
+
statementEntries:
73
+
- action:
74
+
- logs:PutLogEvents
75
+
- logs:CreateLogGroup
76
+
- logs:PutRetentionPolicy
77
+
- logs:CreateLogStream
78
+
- logs:DescribeLogGroups
79
+
- logs:DescribeLogStreams
80
+
effect: Allow
81
+
resource: arn:aws:logs:*:*:*
82
+
secretRef:
83
+
name: <your_role_name>
84
+
namespace: openshift-logging
85
+
serviceAccountNames:
86
+
- logcollector
87
+
----
88
+
+
89
+
. Use the `ccoctl` command to to create a role for AWS using your `CredentialsRequest` CR. With the `CredentialsRequest` object, this `ccoctl` command creates an IAM role with a trust policy that is tied to the specified OIDC identity provider, and a permissions policy that grants permissions to perform operations on CloudWatch resources. This command also creates a YAML configuration file in ``/<path_to_ccoctl_output_dir>/manifests/openshift-logging-<your_role_name>-credentials.yaml`. This secret file contains the `role_arn` key/value used during authentication with the AWS IAM identity provider.
You can forward logs to Amazon CloudWatch, a monitoring and log storage service hosted by Amazon Web Services (AWS). You can forward logs to CloudWatch in addition to, or instead of, the default {logging} managed Elasticsearch log store.
5
+
You can forward logs to Amazon CloudWatch, a monitoring and log storage service hosted by Amazon Web Services (AWS). You can forward logs to CloudWatch in addition to, or instead of, the default log store.
6
6
7
7
To configure log forwarding to CloudWatch, you must create a `ClusterLogForwarder` custom resource (CR) with an output for CloudWatch, and a pipeline that uses the output.
0 commit comments