-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elastic Agent Fails to Start on GKE Autopilot #4699
Comments
The non-fleet elastic agent doesn't work on autopilot since it tries to mount a hostPath volume for writing. See #elastic/cloud-on-k8s#4699 for details. Unfortunately fleet support is only available on master of cloud-on-k8s and not really documented. Will wait to deploy this until we come up with a decision on if we want to use an experimental build.
Hey @ruler501, thanks for your report. HostPath volumes are not available in GKE Autopilot, but you can use other volume types, for example, apiVersion: agent.k8s.elastic.co/v1alpha1
kind: Agent
metadata:
name: quickstart
spec:
version: 7.13.4
elasticsearchRefs:
- name: quickstart
daemonSet:
podTemplate:
spec:
containers:
- name: agent
resources:
requests:
ephemeral-storage: 1Gi
volumes:
- emptyDir: {}
name: agent-data
config:
inputs:
- name: system-1
revision: 1
type: system/metrics
use_output: default
meta:
package:
name: system
version: 0.9.1
data_stream:
namespace: default
streams:
- id: system/metrics-system.cpu
data_stream:
dataset: system.cpu
type: metrics
metricsets:
- cpu
cpu.metrics:
- percentages
- normalized_percentages
period: 10s It results in:
I'll close this issue as such behavior is expected on GKE Autopilot. Please reopen as needed. |
Small additional comments:
It's a known issue that Elastic Agent doesn't work very well on Kubernetes restricted environments like GKE Autopilot (see elastic/beats#19600).
If you want to test Fleet with ECK there is a good news: ECK 1.7.0 has been released today with Fleet support :) |
Bug Report
What did you do?
Tried to deploy an Elastic Agent to a GKE cluster using Autopilot
What did you expect to see?
An elastic agent pod to start.
What did you see instead? Under which circumstances?
The agent failed to start because it is trying to mount a
hostPath
directory in write mode. It looks like the Fleet mode that was recently introduced on master doesn't use the samehostPath
mount so it is possible that will alleviate the problem, but I cannot verify that currently.Environment
1.6.0
Kubernetes information:
The text was updated successfully, but these errors were encountered: