Gratefully forked from https://github.com/callstats-io/fluentd-kubernetes-cloudwatch
The changes are to make the deployment more automated and configurable.
-
Create AWS IAM user which has permission to store logs to CloudWatch
-
Set environment variables for the AWS IAM user including region
export AWS_ACCESS_KEY_ID=<your key>
export AWS_SECRET_ACCESS_KEY=<your secret>
export AWS_DEFAULT_REGION=<your region>
- Optionally set other environment variable to change resource names or labels
NAMESPACE
defaults to 'kube-system'APP_NAME
defaults to 'fluentd-cloudwatch'SECRET_NAME
,CONFIG_NAME
default toAPP_NAME
ENV_NAME
defaults to 'system'CW_LOG_GROUP
defaults to 'kubernetes-cluster'
-
Run
Deploy.sh
to create the Secret, ConfigMap, and DaemonSet -
Run
Display.sh
to check everything is running
-
If you set custom values for the namespace or resource name environment variables, ensure they are still set to your values (
NAMESPACE
,APP_NAME
,SECRET_NAME
,CONFIG_NAME
) -
Run
Delete.sh
-
Run
Display.sh
to check nothing is left