Skip to content

Latest commit

 

History

History
67 lines (62 loc) · 3.45 KB

README.md

File metadata and controls

67 lines (62 loc) · 3.45 KB
Dev Main
Build Status Build Status

This readme is about how to setup and create FluentBit DaemonSet for your cluster. Note: this readme isn't had part about spinning up of AWS OpenSearch, let's assume that you already have one.

Do the following steps:

  1. Check that your cluster has OIDC provider.
  2. Create IAM policy with ability to use AWS OpenSearch:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "es:ESHttp*"
            ],
            "Resource": "arn:aws:es:_region_:account_number:domain/your_domain",
            "Effect": "Allow"
        }
    ]
}
  1. Assign policy to the role that will be used by fluentBit Service account
  2. Create Service account change eks.amazonaws.com/role-arn: your_role_arn to your role arn
kubectl create -f service_account.yaml
  1. Create cluster role
kubectl create -f cluster-role.yaml
  1. Create Cluster role binding
kubectl create -f cluster-role.yaml
  1. Create ConfigMap for you DaemonSet.
kubectl create -f cluster-role.yaml

Take a note on a few things:

  • input-kubernetes.conf:
    • Path - you can put as many paths to parse as you want separated by comma
    • Exclude_Path - you can put as many paths to ignore as you want separated by comma
  • output-elasticsearch.conf:
    • Host - your Opensearch Host
    • Logstash_Format - if enabled FluentBit will put logs in separate indexes for each date.
    • Logstash_Prefix_Key - prefix for each index - could be label from k8s, e.x. kubernetes['pod_name']
  1. Finally, create DaemonSet
kubectl create -f daemonset.yaml
  1. Check pods state and logs of any pod, you will see 403 permissions errors
  2. Setup Permissions on the ES side:
  • go to Security -> roles
  • create role with:
    • CRUD on Cluster permissions
    • CRUD on any index - needed to create new indexes for each day
    • assign your_role from the step 3 as internal user
  1. Check that there is no more403 on DaemonSet side
  2. Check that new indexes are created in Index Managment -> Indeces
  3. To make them searchable in Kibana go to Stack Managment -> Index Patterns -> Create new pattern to match your index

TODO: Create multiline parser for lotus logs check TODO_MULTILINE_PARSER.txt