Connect to the APM Server

edit

This section covers the following topics:

APM Server service

edit

The APM Server is exposed with a Service. For information on accessing it, see How to access Elastic Stack services.

To retrieve the list of all the APM Services, use the following command:

kubectl get service --selector='common.k8s.elastic.co/type=apm-server'
NAME                             TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)    AGE
apm-server-quickstart-apm-http   ClusterIP   10.0.1.252   <none>        8200/TCP   154m

APM Server secret token

edit

The operator generates an authorization token that agents must send to authenticate themselves to the APM Server.

This token is stored in a secret named {APM-server-name}-apm-token and can be retrieved with the following command:

kubectl get secret/apm-server-quickstart-apm-token -o go-template='{{index .data "secret-token" | base64decode}}'

For more information, see APM Server Reference.

APM Server API keys

edit

If you want to configure API keys to authorize requests to the APM Server, instead of using the APM Server CLI, you have to create API keys using the Elasticsearch create API key API, see the APM Server documentation.