How to install elastic search fleet server on Kubernetes

I think I have been going round and round with the whole setup. I am able to get the fleet connection working when working with ECK on cloud. Since it's a managed instance it comes prebuilt with fleet server installed. while installing agents on my OTHER Kubernetes cluster I can just use the fleet URL provided by managed ECK. my configuration looks like this.

apiVersion: apps/v1
kind: DaemonSet
  name: elastic-agent
  namespace: kube-system
- name: FLEET_URL
  value: ""
  value: "XXX=="

correct me if I am wrong this is the fleet server that is installed on managed elastic cloud.

This works perfectly fine I can see data flowing from my prod cluster to this managed ECK cluster.

Now I want to setup fleet server on my monitoring cluster and hoping to see data going from one cluster to this monitoring cluster, just like what I did with managed ECK.

This is the agent server definition I have

kind: Agent
  name: fleet-server
  version: 8.6.2
    name: kibana
  - name: elastic
  mode: fleet
  fleetServerEnabled: true
    replicas: 1
        serviceAccountName: fleet-server
        automountServiceAccountToken: true
          runAsUser: 0

I can see fleet-server pod running, also see Fleet Server Hosts populated as https://fleet-server-agent-http.default.svc:8220 in Kibana. Based on this I should be able to add Fleet Server in kibana. When I follow the directions to add fleet server in kibana finally I end up with command which looks something like this.

curl -L -O
tar xzvf elastic-agent-8.6.2-linux-x86_64.tar.gz
cd elastic-agent-8.6.2-linux-x86_64
sudo ./elastic-agent install \
  --fleet-server-es=https://ES_INGRESS:443 \
  --fleet-server-service-token=XXX \

I am not sure where are we suppose to run this command in Kubernetes.

I was expecting something like a YAML which can setup agent-server for me on this self managed monitoring cluster.

what am I missing here.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.