But here the "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY" are expired every 90 days so it's may be problem to us to remenber and reproduce the credentils to use it.
So can you please suggest any alternatives we can use in this metricbeat configuration instead of "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY".
I have go through the add_kubernetes_metadata processor documentation but not find any IAM role level authentication configuration in that document which will help to complete the task . So please suggest any other alternatives.
Yes, it doe not mention IAM role direct, but it does show how you can set the host and kube_config parameters to configure the access to the cluster.
I believe you have a way to access your kubernetes cluster, right? A way to run kubectl and inspect/modify the state of the cluster. Metricbeat can leverage the same configuration file as kubectl to connect to Kubernetes.
Both, host and kube_config, are documented on the link I provided as well as there is an example:
processors:
- add_kubernetes_metadata:
host: <hostname>
# If kube_config is not set, KUBECONFIG environment variable will be checked
# and if not present it will fall back to InCluster
kube_config: ~/.kube/config
default_indexers.enabled: false
default_matchers.enabled: false
indexers:
- ip_port:
matchers:
- fields:
lookup_fields: ["metricset.host"]
#labels.dedot: true
#annotations.dedot: true
This will allow Metricbeat to connect to Kubernetes and get the necessary metadata.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.