question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[filebeat] Make chart compatible with Kubernetes-on-Windows

See original GitHub issue

Describe the feature:

Although filebeat itself works perfectly fine on Windows and Kubernetes on Windows the Helm chart is not configurable enough to use it for both Linux and Windows.

There’s 2 notable things that need to be possible:

  1. Volume varlibdockercontainers needs to have hostPath /ProgramData/docker/containers to be able to find the container logs. It can still be mapped to mountPath /var/lib/docker/containers, which is actually preferable, because you can then reuse the same config between linux and windows deamonsets.
  2. Mounting files with subPath is not possible for Windows containers, only directories can be mounted. For that reason filebeat-config and data volumes need to be mounted in different locations, without the subPath properties getting used.

Describe a specific use case for the feature:

Shipping logs from Kubernetes on Windows nodes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JorritSalverdacommented, Feb 8, 2021

By the way, my Windows container looks like:

FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS core

# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN $url = 'https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.10.2-windows-x86_64.zip'; \
	Write-Host ('Downloading {0} to filebeat.zip ...' -f $url); \
	Invoke-WebRequest -Uri $url -OutFile 'filebeat.zip' -TimeoutSec 300; \
	\
	$sha512 = '0926ff4fecc24d3f9c606ca138647ee3be42d8e485ae69aff433d559963e712b78f1d093809cb57197064b353c6f48d4184e5081fd506d33467b220a1d991ab2'; \
	Write-Host ('Verifying sha512 ({0}) ...' -f $sha512); \
	if ((Get-FileHash filebeat.zip -Algorithm sha512).Hash -ne $sha512) { \
		Write-Host 'FAILED!'; \
		exit 1; \
	}; \
	\
  New-Item -Path 'c:\' -Name 'filebeat' -ItemType 'directory'; \
	Write-Host 'Expanding filebeat.zip ...'; \
	Expand-Archive filebeat.zip -DestinationPath C:\filebeat; \
	\
	Write-Host 'Removing filebeat.zip ...'; \
	Remove-Item filebeat.zip -Force; \
	\
	Write-Host 'Completed installing filebeat.';

FROM mcr.microsoft.com/windows/nanoserver:1809

COPY --from=core /filebeat/filebeat-7.10.2-windows-x86_64 /filebeat
COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll

USER ContainerAdministrator

ENTRYPOINT [ "c:\\filebeat\\filebeat.exe", "-c", "c:\\usr\\share\\filebeat\\filebeat.yml" ]
0reactions
botelastic[bot]commented, Jan 19, 2022

This issue has been automatically closed because it has not had recent activity since being marked as stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run Filebeat on Kubernetes | Filebeat Reference [8.5] - Elastic
You can use Filebeat Docker images on Kubernetes to retrieve and ship container logs. Running Elastic Cloud on Kubernetes? See Run Beats on...
Read more >
filebeat 8.5.1 · elastic/elastic - Artifact Hub
This Helm chart is a lightweight way to configure and run our official Filebeat Docker image. Warning When it comes to running the...
Read more >
Ship k8s logs with Helm via Filebeat - Logz.io Docs
Overview. You can use a Helm chart to ship k8s logs to Logz.io via Filebeat from Linux and Windows nodes. Helm is a...
Read more >
Kubernetes with Filebeat - Coralogix
The following manual will help you integrate Coralogix with your Kubernetes cluster using Filebeat. See other tutorials for:.
Read more >
Using Elastic Stack, Filebeat (for log aggregation)
You can use Filebeat Docker images on Kubernetes to retrieve and ship the ... ubuntu_minikube_helm_elastic: Creating filebeat-chart
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found