kubernetes-app
kubernetes-app copied to clipboard
Problem when connecting to gke cluster
Hello.
I have prometheus and grafana implemented into my gke (Google Kubernetes Engine) cluster and when I try to test your app it can't connect to the cluster and shows a Bad Request or Bad gateway error.
Have tried for hours and can't find out how to connect my cluster to this app.
I would really appreciate your help.
Hello.
Yes, struggling with the same. Not quite sure if I understand where to get the cluster http url but I'm running the grafana/prometheus under the same k8s cluster. Would be very glad if you can add some more detailed instruction on how to configure kubernetes data source.
Hello again.
I just found how to resolve this issue by my self, so here are the steps:
- (Just to make sure) You have to ensure you have a Service Account with a valid ClusterRole attached to your grafana deployment
- Give that SA (Service account) the perms needed to call api and get info about the cluster and other elements
- Go to your google cloud console and get into the Clusters section in gke
- Open your desired cluster and click at show credentias (at the right side of endpoint address)
- Get your user/password combination
- Go to grafana and get to your cluster by the datasources path (datasources --> your cluster) if created or at the kubernetes-app create one, then place the cluster IP (the one you get with kubectl get services) in this way: https://yout-cluster-ip:443 with proxy access mode, then check skip tls verification and basic auth using your user/password combination there.
- Maybe data doesn't displays because prometheus config doesn't deploy well, so just get to your cluster config (at the kubernetes app) and at the bottom you will find a configuring prometheus link, click it and then add that jobs (don't replace all the scrape'configs, just add that ones as new ones) to the file, changing jobs names in case they conflict with anothers you have at the same file (deployment will always restart if this happens, so just check logs).
Please try it out and comment again with the close option in case this solved your issue aswell so we are sure it works. Hope this helps you and anothers with the same problem.
@LKO124 how i create credentias on the independent kubernetes cluster to be used the on the Service Accoun ?
manage to install on a independent kubernetes , used TLS Client Auth and With CA Cert .
Hello, I'm using the private cluster in GKE, so each Node only has private IP. Is it possible setup proxy to connect to Master Node?