aws-samples / aws-samples/amazon-cloudwatch-container-insights
Fluent-bit : Use Kubelet_Host and avoid enabling host networking
- Dominant language
- Shell
- Stars
- 178
- Forks
- 117
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 3
Description
https://github.com/fluent/fluent-bit/issues/5143 added ability to communicate over host's IP and avoid using host networking feature. This a secure way where in network policies will be respected. The fluent-bit daemonset manifests at https://github.com/aws-samples/amazon-cloudwatch-container-insights/tree/main/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit needs to be updated to use Kubelet_Host and disable host networking.
```
[FILTER]
Name kubernetes
Match kube.*
Use_Kubelet true
Kubelet_Host ${KUBELET_HOST}
```
```
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluent-bit
spec:
template:
spec:
hostNetwork: false
containers:
- name: fluent-bit
image: fluent/fluent-bit
env:
- name: KUBELET_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
```
Contributor guide
Research direction
Start with the Fluent Bit DaemonSet manifests under k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit. Review the existing Kubernetes filter configuration and pod networking settings, then verify that the manifests use Kubelet_Host with status.hostIP and disable host networking; done means the updated manifests respect network policies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100