Skip to content

Commit c6046e7

Browse files
authored
feat: Adding Kubelet Monitoring feature for ContainerInsights (#253)
1 parent bf37e2f commit c6046e7

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

docs/addons/aws-for-fluentbit.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,29 @@ If you want to enable [Container Insights on Amazon EKS](https://docs.aws.amazon
3838
}
3939
```
4040

41+
By default, ClusterInsights will not enable the `kubelet` monitoring feature, with AWS for FluentBit integration, since this is an optional feature that is suggested to be enabled only on large clusters. To enable the [ClusterInsights Use_Kubelet feature](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights-use-kubelet.html) you'll need to provide a few more parametees:
42+
43+
```hcl
44+
enable_aws_for_fluentbit = true
45+
aws_for_fluentbit = {
46+
enable_containerinsights = true
47+
kubelet_monitoring = true
48+
set = [{
49+
name = "cloudWatchLogs.autoCreateGroup"
50+
value = true
51+
},
52+
{
53+
name = "hostNetwork"
54+
value = true
55+
},
56+
{
57+
name = "dnsPolicy"
58+
value = "ClusterFirstWithHostNet"
59+
}
60+
]
61+
}
62+
```
63+
4164
## Verify the Fluent Bit setup
4265

4366
Verify aws-for-fluentbit pods are running.

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,8 @@ resource "kubernetes_config_map_v1_data" "aws_for_fluentbit_containerinsights" {
833833
K8S-Logging.Exclude Off
834834
Labels Off
835835
Annotations Off
836+
${try(var.aws_for_fluentbit.kubelet_monitoring, false) ? "Use_Kubelet On" : ""}
837+
${try(var.aws_for_fluentbit.kubelet_monitoring, false) ? "Kubelet_Port 10250" : ""}
836838
Buffer_Size 0
837839
838840
[OUTPUT]

tests/complete/main.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,21 @@ module "eks_blueprints_addons" {
168168
}
169169
aws_for_fluentbit = {
170170
enable_containerinsights = true
171+
kubelet_monitoring = true
171172
chart_version = "0.1.28"
172173
set = [{
173174
name = "cloudWatchLogs.autoCreateGroup"
174175
value = true
175-
}]
176+
},
177+
{
178+
name = "hostNetwork"
179+
value = true
180+
},
181+
{
182+
name = "dnsPolicy"
183+
value = "ClusterFirstWithHostNet"
184+
}
185+
]
176186
s3_bucket_arns = [
177187
module.velero_backup_s3_bucket.s3_bucket_arn,
178188
"${module.velero_backup_s3_bucket.s3_bucket_arn}/logs/*"

0 commit comments

Comments
 (0)