Skip to content
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

Issue with elastic-agent-complete on GKE Autopilot Cluster #7248

Closed
b2ronn opened this issue Oct 18, 2023 · 1 comment
Closed

Issue with elastic-agent-complete on GKE Autopilot Cluster #7248

b2ronn opened this issue Oct 18, 2023 · 1 comment

Comments

@b2ronn
Copy link

b2ronn commented Oct 18, 2023

I have a GKE Autopilot Cluster, and I'm using ECK Operator 2.9.0 to install an Elasticsearch cluster version 8.10.4 along with agents in Kubernetes. To configure the agent for synthetic tests, I'm using the following configuration:

apiVersion: agent.k8s.elastic.co/v1alpha1
kind: Agent
metadata:
  name: synth-tests
spec:
  deployment:
    podTemplate:
      spec:
        containers:
          - image: docker.elastic.co/beats/elastic-agent-complete:8.10.4
            name: agent
            resources:
              limits:
                cpu: '2'
                memory: 2Gi
              requests:
                cpu: '2'
                memory: 2Gi
        volumes:
          - emptyDir: {}
            name: agent-data
    replicas: 1
  fleetServerRef:
    name: fleetserver
  kibanaRef:
    name: kibana
  mode: fleet
  policyID: synthetics
  version: 8.10.4

However, when I try to run it, I encounter the following error:

cp: cannot create regular file '/usr/local/share/ca-certificates/ca.crt': Permission denied

If I run the agent with runAsUser: 0, the tests fail

job could not be initialized: script monitors cannot be run as root

PS
Additionally, GKE Autopilot Cluster doesn't permit host-path . To work around this, I'm using:

        volumes:
          - emptyDir: {}
            name: agent-data
@botelastic botelastic bot added the triage label Oct 18, 2023
@barkbay
Copy link
Contributor

barkbay commented Nov 15, 2023

I'm using ECK Operator 2.9.0
[...]
cp: cannot create regular file '/usr/local/share/ca-certificates/ca.crt': Permission denied

This is fixed in ECK 2.10.0: #6700

PS
Additionally, GKE Autopilot Cluster doesn't permit host-path . To work around this, I'm using:

This is documented here: https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-autopilot-deploy-agent-beats.html#k8s-autopilot-deploy-agent-beats

I'm closing as I think your two comments are already addressed. Feel free to reopen if you think it's not the case.

@barkbay barkbay closed this as completed Nov 15, 2023
@botelastic botelastic bot removed the triage label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants