Hi,
I’m trying to reach my Kubernetes API but somehow I’m unable to set it up with UI.
To access the environment I use env.yaml , please note “certificate-authority-data” contains long string of random characters I replaced it with same letter for demonstration same for env-test.
My K8s and VM are reachable, to one another as Im monitoring some hosts which are hosted on similar CIDR within AWS.
With this Kubeconfig file im able to reach my Kubernetes API with command like this locally
KUBECONFIG=env-aws.yml kubectl get pods
However this is the my UI part , where after I add endpoint im unsure regarding generating a token. I have tried different things but I wasn’t able to get metrics for K8s
Thank you I made some progress.
Generate Certificate and Token , added them to checkMK.
Now my Problem is once I create a host , how do I link that host to my K8s ?
This is my Host:
In the context of the Kubernetes rule, set a hostname “my-k8s-cluster”
This way, the rule is applied to that specific host and the host then knows it has to fetch the data from the K8s API
I found my issue looks like the token generated with aws eks --region get-token gives a token that is only valid of 15 minutes , do you maybe know if there is a way to get that token to be permanent
A token will be automatically generated, if you installed it via the provided helm chart. After the installation, you are also provided with commands to get the token as well.
You can use helm get notes RELEASE_NAME to see the commands again.
Our documentation also provides details on how to get the right token
You also need to use a token of the respective service account. A generic token is probably not best practice anyway and might not have the rights required, or might have too many rights. Because the token might be the one of the user creating it, and not of a service account.