{"id":24629582,"url":"https://github.com/framsouza/eck-fleet-and-elastic-agent","last_synced_at":"2026-05-21T05:04:31.316Z","repository":{"id":168612647,"uuid":"398894119","full_name":"framsouza/eck-fleet-and-elastic-agent","owner":"framsouza","description":"Running Fleet \u0026 Elastic agent on ECK (7.14.0)","archived":false,"fork":false,"pushed_at":"2021-09-01T10:43:31.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T13:43:01.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/framsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-22T20:26:17.000Z","updated_at":"2024-09-08T15:44:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbd17c04-c833-4599-96fe-310ddaab449f","html_url":"https://github.com/framsouza/eck-fleet-and-elastic-agent","commit_stats":null,"previous_names":["framsouza/eck-fleet-and-elastic-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/framsouza/eck-fleet-and-elastic-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Feck-fleet-and-elastic-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Feck-fleet-and-elastic-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Feck-fleet-and-elastic-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Feck-fleet-and-elastic-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/framsouza","download_url":"https://codeload.github.com/framsouza/eck-fleet-and-elastic-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Feck-fleet-and-elastic-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33289546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-25T06:13:18.674Z","updated_at":"2026-05-21T05:04:31.294Z","avatar_url":"https://github.com/framsouza.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# eck-fleet-and-elastic-agent\n\nThis page will guide you through how to configure elastic agent with fleet managed mode using ECK.\nElastic agent is a unified way to collect logs and metrics and ship them to elasticsearch, basically, instead of configuring filebeat and metricbeat, you can now choose by install only Elastic agent in your host.\nOn the other hand, Fleet is a Kibana UI to add and manage elastic agents.\n\n## Jumping into it\nFirst thing first, let's deploy our elasticsearch cluster by applying the [es.yml](https://github.com/framsouza/eck-fleet-and-elastic-agent/blob/main/es.yml) file.\nThere's nothing to care about on this manifest, this is pretty straightforward, contains only the resource request/limit (very important to set it) and the vm.max_map_count adjustment. \n\nNext step is deploy Kibana by applying the [kibana.yml](https://github.com/framsouza/eck-fleet-and-elastic-agent/blob/main/kibana.yml). There are two lines to pay attention here:\n\n```\n xpack.fleet.agents.elasticsearch.host: \"https://cluster1-es-http.default.svc:9200\"\n xpack.fleet.agents.fleet_server.hosts: [\"https://fleet-server-agent-http.default.svc:8220\"]\n```\n\nThose lines are required to properly configure Fleet.\n\n`xpack.fleet.agents.elasticsearch.host` must point to elasticsearch cluster where the elastic agent will ship the data. \n`xpack.fleet.agents.fleet_server.hosts` must point to Fleet Server that Elastic Agent should connect to.\n\nNo worries, once you deploy Fleet Server a Kubernetes service will be automatically created, then you should use it on the `xpack.fleet.agents.fleet_server.hosts` configuration.\n\nOnce you have elasticsearch \u0026 kibana up and running, we can now deploy first the serviceaccount \u0026 cluster rules by applying the [clusterroles.yml](https://github.com/framsouza/eck-fleet-and-elastic-agent/blob/main/clusterroles.yml) and then  the Fleet server by applying the [fleet.yml](https://github.com/framsouza/eck-fleet-and-elastic-agent/blob/main/fleet.yml)\n\nThere are some important things to take into consideration in this file. First things first, make sure to properly configure the `kibanaRef` and `elasticsearchRefs` .\n\nAs we are using Fleet, the `mode` configuration must be `fleet`, and to make it works as a Fleet server instead of agent, you must add the line `fleetServerEnabled: true`, if you don't add it, it will work as a elastic agent.\n\nWe are deploying only 1 replica (which is enough for this test but you may increase it to handle your workload) and defining the serviceaccount permission to be able to access the Kubernetes resources. \n\nOnce we have the fleet server up and running (you can check it by looking into the pod logs _kubectl logs deploy/fleet-server-agent_ or checking the resource status by running _kubectl get agents_) let's deploy the elastic agent that will be managed by Fleet by applying the [elastic-agent.yml](https://github.com/framsouza/eck-fleet-and-elastic-agent/blob/main/elastic-agent.yml) manifest.\n\nYou can deploy it as daemonset or deployment, in this case, we are going to use daemonset because we want to collect Kubernetes metrics from every single node.\n\nAs well as the Fleet server, we must specify the `kibanaRef`. We also need to specify the fleet server ref (instead of elasticsearchRef) using the `fleetServerRef` (you can check the name by running _kubectl get agents_). \nThe way we know this is agent is by using only the `mode : fleet`, it will make it works by an agent. \n\nOnce you deploy it, you can access Kibana and go to Fleet and you will see something similar to that: \n\n\u003cimg width=\"1431\" alt=\"Screenshot 2021-09-01 at 12 22 34\" src=\"https://user-images.githubusercontent.com/16880741/131655392-2fd814c1-8453-400b-8e2f-43359de0944c.png\"\u003e\n\nYou can then access the Default policy and add the Kubernetes integration, once this is added and updated in every single agent you can access the Metric inventory and check the Kubernetes pods metrics like that:\n\n\u003cimg width=\"1436\" alt=\"Screenshot 2021-09-01 at 12 24 15\" src=\"https://user-images.githubusercontent.com/16880741/131655647-7c2c6fa1-c5a3-40d7-aa3a-e30ec2bd60b7.png\"\u003e\n\n\nQuite easy, right? ;)\n\nI hope this helps you \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Feck-fleet-and-elastic-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fframsouza%2Feck-fleet-and-elastic-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Feck-fleet-and-elastic-agent/lists"}