How can I give access to statping deployed outside k8s cluster to monitor k8s services uptime?

3/22/2021

I want statping to be independent of the infra it is monitoring. But I want to check the services uptime which are on clusterIP inside the k8s EKS cluster. Will setting up kubeconfig on the EC2 instance help ?

-- ssbb191
amazon-web-services
kubernetes
monitoring
service

1 Answer

3/22/2021

There are multiple ways to access Kubernetes Services from the statping EC2 Instance.

All of them are discussed in https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/

https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#so-many-proxies

kubectl proxy https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#using-kubectl-proxy is a good option for your use case if you already have kubeconfig on the statping EC2 Instance.

You can use https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#manually-constructing-apiserver-proxy-urls to construct the Proxy URLs.

-- Sagar Velankar
Source: StackOverflow