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
47
+
48
+
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`.
49
+
50
+
.Prerequisites
51
+
52
+
* {logging-title-uc}: 5.5 and later
53
+
54
+
[NOTE]
55
+
====
56
+
This feature is not supported by the vector collector.
57
+
====
58
+
59
+
.Creating an AWS credentials request
60
+
. Create a `CredentialsRequest` Custom Resource YAML using the template below:
61
+
+
62
+
.CloudWatch Credentials Request Template
63
+
[source,yaml]
64
+
----
65
+
apiVersion: cloudcredential.openshift.io/v1
66
+
kind: CredentialsRequest
67
+
metadata:
68
+
name: <your_role_name>-credrequest
69
+
namespace: openshift-cloud-credential-operator
70
+
spec:
71
+
providerSpec:
72
+
apiVersion: cloudcredential.openshift.io/v1
73
+
kind: AWSProviderSpec
74
+
statementEntries:
75
+
- action:
76
+
- logs:PutLogEvents
77
+
- logs:CreateLogGroup
78
+
- logs:PutRetentionPolicy
79
+
- logs:CreateLogStream
80
+
- logs:DescribeLogGroups
81
+
- logs:DescribeLogStreams
82
+
effect: Allow
83
+
resource: arn:aws:logs:*:*:*
84
+
secretRef:
85
+
name: <your_role_name>
86
+
namespace: openshift-logging
87
+
serviceAccountNames:
88
+
- logcollector
89
+
----
90
+
+
91
+
. 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