generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
same issue as this: aws/amazon-cloudwatch-agent#1101
I solved it by modifying /cloudwatch-agent-daemonset.yaml
like this:
apiVersion: cloudwatch.aws.amazon.com/v1alpha1
kind: AmazonCloudWatchAgent
metadata:
name: {{ template "cloudwatch-agent.name" . }}
namespace: {{ .Release.Namespace }}
spec:
+ hostNetwork: true
image: {{ template "cloudwatch-agent.image" . }}
mode: daemonset
...
env:
+ - name: RUN_WITH_IRSA
+ value: "True"
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
...
And, configured Gatekeeper to restrict the hostnetwork access exclusive to cloudwatch agent.
As this doc recommends to block IMDS access from unwanted pods:
https://docs.aws.amazon.com/whitepapers/latest/security-practices-multi-tenant-saas-applications-eks/restrict-the-use-of-host-networking-and-block-access-to-instance-metadata-service.html
But, there needs to be more robust and permanent solution to address this issue.
Metadata
Metadata
Assignees
Labels
No labels