Enable Logging¶
To enable Amazon EKS Control Plane Logging we follow the official EKS docs:
$ aws eks update-cluster-config \
> --name ${EKS_CLUSTER?} \
> --logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}'
To enable Container Insights we follow the official docs:
Edit
rok/amazon-cloudwatch/overlays/deploy/patches/configmap.yaml
to set the cluster name and region:cluster.name: myclustername logs.region: us-east-1
Commit the change:
$ git commit -am "Configure fluentd cloudwatch agent"
Apply the Fluentd manifests to Kubernetes:
$ rok-deploy --apply rok/amazon-cloudwatch/overlays/deploy/
The logs will be available at CloudWatch.