I'm trying out Elasticsearch with APM on Kubernetes. I downloaded this file:
Then changed the Elasticsearch deployment to have 1 node instead of 3. Just for reference, this is now what it looks like:
# This sample sets up a an Elasticsearch cluster along with a Kibana instance
# and an APM server, configured to be able to communicate with each other
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: es-apm-sample
spec:
version: 8.14.0
nodeSets:
- name: default
count: 1
config:
# This setting could have performance implications for production clusters.
# See: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-virtual-memory.html
node.store.allow_mmap: false
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kb-apm-sample
spec:
version: 8.14.0
count: 1
elasticsearchRef:
name: "es-apm-sample"
config:
xpack.fleet.packages:
- name: apm
version: latest
---
apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-apm-sample
spec:
version: 8.14.0
count: 1
elasticsearchRef:
name: "es-apm-sample"
# this allows ECK to configure automatically the Kibana endpoint as described in https://www.elastic.co/guide/en/apm/server/current/setup-kibana-endpoint.html
kibanaRef:
name: "kb-apm-sample"
I tried running this commands and it gave these results
kubectl apply -f apm_es_kibana.yaml
# then wait a few minutes
kubectl get pods
NAME READY STATUS RESTARTS AGE
apm-apm-sample-apm-server-686554bf55-d6skf 1/1 Running 0 2m46s
es-apm-sample-es-default-0 1/1 Running 0 2m49s
kb-apm-sample-kb-59d7684764-j85hd 1/1 Running 0 2m46s
kubectl get apm
NAME HEALTH NODES VERSION AGE
apm-apm-sample green 1 8.14.0 4m6
kubectl get elasticsearch
NAME HEALTH NODES VERSION PHASE AGE
es-apm-sample green 1 8.14.0 Ready 4m19s
kubectl get kibana
NAME HEALTH NODES VERSION AGE
kb-apm-sample green 1 8.14.0 4m30s
kubectl port-forward service/kb-apm-sample-kb-http --address 192.168.0.101 5601
Then I login to Kibana at this url https://192.168.0.101:5601
, and then I click to Fleet>Agents
and Fleet>Agent Policies
but both screens show empty as shown below:
I thought I should see at least one agent for the Fleet server and one policy that has APM integration. Did I do something wrong or did I miss a step?