I want to display the GUI of prometheus and grafana on kubernetesHow to choose the external IP address of a Kubernetes load balancer in Google Kubernetes EngineKubernetes Disable GrafanaFind the SkyDNS ip and port in kubernetesKubernetes heapster - Grafana doesn't display influxdb dataCan Kubernetes service mount multiple “portions” of a single GCE disk at the multiple mount paths?Monitor health of prometheus deployment within kubernetes?Kubernetes - can I avoid using the GCE Load Balancer to reduce cost?Routing traffic through OpenVPN on Kubernetes with CalicoNode-to-Node communication doesn't work with Kubernetes with CalicoKubernetes with cert-manager and nginx

Where's this swanky house and vineyard near a mountain?

Why does Linux list NVMe drives as /dev/nvme0 instead of /dev/sda?

Why does independence imply zero correlation?

Should I include an appendix for inessential, yet related worldbuilding to my story?

Can humans ever directly see a few photons at a time? Can a human see a single photon?

Boss wants someone else to lead a project based on the idea I presented to him

Why is it easier to balance a non-moving bike standing up than sitting down?

Get list of shortcodes from content

Why do all the teams that I have worked with always finish a sprint without completion of all the stories?

Is there any difference between Т34ВМ1 and КМ1858ВМ1/3?

Did the CIA blow up a Siberian pipeline in 1982?

How do I farm creepers for XP without them exploding?

How many people are necessary to maintain modern civilisation?

LWC - Local Dev - How can I run the local server on HTTPS?

How would modern naval warfare have to have developed differently for battleships to still be relevant in the 21st century?

What is the origin of Scooby-Doo's name?

Loss of power when I remove item from the outlet

Am I legally required to provide a (GPL licensed) source code even after a project is abandoned?

`-` in tar xzf -

Do I have to explain the mechanical superiority of the player-character within the fiction of the game?

Encounter design and XP thresholds

What is appropriate short form for "laboratoires" in French?

Can I enter the UK for 24 hours from a Schengen area, holding an Indian passport?

Is there any proof that high saturation and contrast makes a picture more appealing in social media?



I want to display the GUI of prometheus and grafana on kubernetes


How to choose the external IP address of a Kubernetes load balancer in Google Kubernetes EngineKubernetes Disable GrafanaFind the SkyDNS ip and port in kubernetesKubernetes heapster - Grafana doesn't display influxdb dataCan Kubernetes service mount multiple “portions” of a single GCE disk at the multiple mount paths?Monitor health of prometheus deployment within kubernetes?Kubernetes - can I avoid using the GCE Load Balancer to reduce cost?Routing traffic through OpenVPN on Kubernetes with CalicoNode-to-Node communication doesn't work with Kubernetes with CalicoKubernetes with cert-manager and nginx






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-2















prometheusによるkubernetesのクラスタ監視



Kubernetes Setup for Prometheus and Grafana



The following comment was executed referring to



kubectl apply 
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml


[root@instance-1 ~]# kubectl get pods --namespace=monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-78cbf8f796-crk8k 1/1 Running 0 42m
grafana-core-7f65444f84-2rg6q 1/1 Running 0 42m
grafana-import-dashboards-h4bp5 0/1 Completed 0 42m
kube-state-metrics-5f4c7f9d47-s2ndv 1/1 Running 0 42m
node-directory-size-metrics-57lm5 2/2 Running 0 42m
node-directory-size-metrics-5ncxd 2/2 Running 0 42m
prometheus-core-5c96ddd598-srk4l 1/1 Running 0 42m
prometheus-node-exporter-b8wfz 1/1 Running 0 42m
prometheus-node-exporter-rbfkh 1/1 Running 0 42m


[root@instance-1 ~]# kubectl get svc --namespace=monitoring
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
alertmanager NodePort 10.19.254.177 <none> 9093:30576/TCP 44m
grafana NodePort 10.19.244.179 <none> 3000:31362/TCP 44m
kube-state-metrics ClusterIP 10.19.241.158 <none> 8080/TCP 44m
prometheus NodePort 10.19.241.218 <none> 9090:30472/TCP 44m
prometheus-node-exporter ClusterIP None <none> 9100/TCP 44m


I did, but I can not see the GUI of prometheus and grafana.
You will not be able to access this site.
Please tell me how to use GUI.



If the necessary part is not enough, add it.
Thank you.



Cluster setting method
[root@instance-1 ~]curl https://sdk.cloud.google.com | bash
[root@instance-1 ~]gcloud init
[root@instance-1 ~]sudo yum update kubectl
[root@instance-1 ~]cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl
[root@instance-1 ~]gcloud container clusters create cluster-1
--num-nodes 1
--machine-type n1-standard-2


after that
[root@instance-1 ~]kubectl apply
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml
[root@instance-1 ~]# kubectl get pods --namespace=monitoring
[root@instance-1 ~]# kubectl get svc --namespace=monitoring
[root@instance-1 ~]#kubectl port-forward svc/prometheus 9090:9090 -n monitoring


[root@instance-1 ~]# kubectl get svc --namespace=monitoring← I tried setting without using this command, but it was useless.


Browser screen



I can not access this site Connection denied on localhost.
Please try the following

Check connection
Check proxy and firewall
ERR_CONNECTION_REFUSED









share|improve this question
























  • It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

    – Lucas Ramage
    Jun 6 at 12:40











  • Excuse me. Why was this question not voted? Is the writing wrong?

    – GABAKU GIK
    Jun 8 at 18:54

















-2















prometheusによるkubernetesのクラスタ監視



Kubernetes Setup for Prometheus and Grafana



The following comment was executed referring to



kubectl apply 
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml


[root@instance-1 ~]# kubectl get pods --namespace=monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-78cbf8f796-crk8k 1/1 Running 0 42m
grafana-core-7f65444f84-2rg6q 1/1 Running 0 42m
grafana-import-dashboards-h4bp5 0/1 Completed 0 42m
kube-state-metrics-5f4c7f9d47-s2ndv 1/1 Running 0 42m
node-directory-size-metrics-57lm5 2/2 Running 0 42m
node-directory-size-metrics-5ncxd 2/2 Running 0 42m
prometheus-core-5c96ddd598-srk4l 1/1 Running 0 42m
prometheus-node-exporter-b8wfz 1/1 Running 0 42m
prometheus-node-exporter-rbfkh 1/1 Running 0 42m


[root@instance-1 ~]# kubectl get svc --namespace=monitoring
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
alertmanager NodePort 10.19.254.177 <none> 9093:30576/TCP 44m
grafana NodePort 10.19.244.179 <none> 3000:31362/TCP 44m
kube-state-metrics ClusterIP 10.19.241.158 <none> 8080/TCP 44m
prometheus NodePort 10.19.241.218 <none> 9090:30472/TCP 44m
prometheus-node-exporter ClusterIP None <none> 9100/TCP 44m


I did, but I can not see the GUI of prometheus and grafana.
You will not be able to access this site.
Please tell me how to use GUI.



If the necessary part is not enough, add it.
Thank you.



Cluster setting method
[root@instance-1 ~]curl https://sdk.cloud.google.com | bash
[root@instance-1 ~]gcloud init
[root@instance-1 ~]sudo yum update kubectl
[root@instance-1 ~]cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl
[root@instance-1 ~]gcloud container clusters create cluster-1
--num-nodes 1
--machine-type n1-standard-2


after that
[root@instance-1 ~]kubectl apply
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml
[root@instance-1 ~]# kubectl get pods --namespace=monitoring
[root@instance-1 ~]# kubectl get svc --namespace=monitoring
[root@instance-1 ~]#kubectl port-forward svc/prometheus 9090:9090 -n monitoring


[root@instance-1 ~]# kubectl get svc --namespace=monitoring← I tried setting without using this command, but it was useless.


Browser screen



I can not access this site Connection denied on localhost.
Please try the following

Check connection
Check proxy and firewall
ERR_CONNECTION_REFUSED









share|improve this question
























  • It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

    – Lucas Ramage
    Jun 6 at 12:40











  • Excuse me. Why was this question not voted? Is the writing wrong?

    – GABAKU GIK
    Jun 8 at 18:54













-2












-2








-2








prometheusによるkubernetesのクラスタ監視



Kubernetes Setup for Prometheus and Grafana



The following comment was executed referring to



kubectl apply 
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml


[root@instance-1 ~]# kubectl get pods --namespace=monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-78cbf8f796-crk8k 1/1 Running 0 42m
grafana-core-7f65444f84-2rg6q 1/1 Running 0 42m
grafana-import-dashboards-h4bp5 0/1 Completed 0 42m
kube-state-metrics-5f4c7f9d47-s2ndv 1/1 Running 0 42m
node-directory-size-metrics-57lm5 2/2 Running 0 42m
node-directory-size-metrics-5ncxd 2/2 Running 0 42m
prometheus-core-5c96ddd598-srk4l 1/1 Running 0 42m
prometheus-node-exporter-b8wfz 1/1 Running 0 42m
prometheus-node-exporter-rbfkh 1/1 Running 0 42m


[root@instance-1 ~]# kubectl get svc --namespace=monitoring
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
alertmanager NodePort 10.19.254.177 <none> 9093:30576/TCP 44m
grafana NodePort 10.19.244.179 <none> 3000:31362/TCP 44m
kube-state-metrics ClusterIP 10.19.241.158 <none> 8080/TCP 44m
prometheus NodePort 10.19.241.218 <none> 9090:30472/TCP 44m
prometheus-node-exporter ClusterIP None <none> 9100/TCP 44m


I did, but I can not see the GUI of prometheus and grafana.
You will not be able to access this site.
Please tell me how to use GUI.



If the necessary part is not enough, add it.
Thank you.



Cluster setting method
[root@instance-1 ~]curl https://sdk.cloud.google.com | bash
[root@instance-1 ~]gcloud init
[root@instance-1 ~]sudo yum update kubectl
[root@instance-1 ~]cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl
[root@instance-1 ~]gcloud container clusters create cluster-1
--num-nodes 1
--machine-type n1-standard-2


after that
[root@instance-1 ~]kubectl apply
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml
[root@instance-1 ~]# kubectl get pods --namespace=monitoring
[root@instance-1 ~]# kubectl get svc --namespace=monitoring
[root@instance-1 ~]#kubectl port-forward svc/prometheus 9090:9090 -n monitoring


[root@instance-1 ~]# kubectl get svc --namespace=monitoring← I tried setting without using this command, but it was useless.


Browser screen



I can not access this site Connection denied on localhost.
Please try the following

Check connection
Check proxy and firewall
ERR_CONNECTION_REFUSED









share|improve this question
















prometheusによるkubernetesのクラスタ監視



Kubernetes Setup for Prometheus and Grafana



The following comment was executed referring to



kubectl apply 
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml


[root@instance-1 ~]# kubectl get pods --namespace=monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-78cbf8f796-crk8k 1/1 Running 0 42m
grafana-core-7f65444f84-2rg6q 1/1 Running 0 42m
grafana-import-dashboards-h4bp5 0/1 Completed 0 42m
kube-state-metrics-5f4c7f9d47-s2ndv 1/1 Running 0 42m
node-directory-size-metrics-57lm5 2/2 Running 0 42m
node-directory-size-metrics-5ncxd 2/2 Running 0 42m
prometheus-core-5c96ddd598-srk4l 1/1 Running 0 42m
prometheus-node-exporter-b8wfz 1/1 Running 0 42m
prometheus-node-exporter-rbfkh 1/1 Running 0 42m


[root@instance-1 ~]# kubectl get svc --namespace=monitoring
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
alertmanager NodePort 10.19.254.177 <none> 9093:30576/TCP 44m
grafana NodePort 10.19.244.179 <none> 3000:31362/TCP 44m
kube-state-metrics ClusterIP 10.19.241.158 <none> 8080/TCP 44m
prometheus NodePort 10.19.241.218 <none> 9090:30472/TCP 44m
prometheus-node-exporter ClusterIP None <none> 9100/TCP 44m


I did, but I can not see the GUI of prometheus and grafana.
You will not be able to access this site.
Please tell me how to use GUI.



If the necessary part is not enough, add it.
Thank you.



Cluster setting method
[root@instance-1 ~]curl https://sdk.cloud.google.com | bash
[root@instance-1 ~]gcloud init
[root@instance-1 ~]sudo yum update kubectl
[root@instance-1 ~]cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl
[root@instance-1 ~]gcloud container clusters create cluster-1
--num-nodes 1
--machine-type n1-standard-2


after that
[root@instance-1 ~]kubectl apply
--filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml
[root@instance-1 ~]# kubectl get pods --namespace=monitoring
[root@instance-1 ~]# kubectl get svc --namespace=monitoring
[root@instance-1 ~]#kubectl port-forward svc/prometheus 9090:9090 -n monitoring


[root@instance-1 ~]# kubectl get svc --namespace=monitoring← I tried setting without using this command, but it was useless.


Browser screen



I can not access this site Connection denied on localhost.
Please try the following

Check connection
Check proxy and firewall
ERR_CONNECTION_REFUSED






kubernetes google-kubernetes-engine






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 6 at 10:43







GABAKU GIK

















asked Jun 2 at 18:41









GABAKU GIKGABAKU GIK

32




32












  • It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

    – Lucas Ramage
    Jun 6 at 12:40











  • Excuse me. Why was this question not voted? Is the writing wrong?

    – GABAKU GIK
    Jun 8 at 18:54

















  • It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

    – Lucas Ramage
    Jun 6 at 12:40











  • Excuse me. Why was this question not voted? Is the writing wrong?

    – GABAKU GIK
    Jun 8 at 18:54
















It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

– Lucas Ramage
Jun 6 at 12:40





It would be helpful to know why this question was downvoted, instead of just downvoting it and not leaving any hints.

– Lucas Ramage
Jun 6 at 12:40













Excuse me. Why was this question not voted? Is the writing wrong?

– GABAKU GIK
Jun 8 at 18:54





Excuse me. Why was this question not voted? Is the writing wrong?

– GABAKU GIK
Jun 8 at 18:54










1 Answer
1






active

oldest

votes


















2














Welcome on StackExchange @GABAKU GIK



Use following commands to access them respectively:



  1. Prometheus dashboard:

kubectl port-forward svc/prometheus 9090:9090 -n monitoring



  1. Grafana dashboard:

kubectl --namespace monitoring port-forward svc/grafana 3000




Promethues console:



Once you run successfully first kubectl command you should see in your terminal similar output:



Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090


then open the URL: 'http://localhost:9090'



enter image description here



Update:




First general remark for using 'kubectl port-forward' command'.
By default you can access/preview the application's GUI only on the same host where the kubectl port-forward command was issued (this is why 'localhost' is seen in the URL of Promethues console)




for fresh GCP users:



I can see you have a Managed Kubernetes version (GKE).
In that case the easiest way for you to access Prometheus console is with help of Cloud Shell.



  1. How to start a new Cloud Shell session is described here

  2. Once your shell session is initialized, issue the following command to configure your 'kubectl' command line tool, to be able to talk to your k8s cluster:
    gcloud container clusters get-credentials [CLUSTER_NAME]


  3. On the same shell session, start port-forwarding to Prometheus dashboard:
    kubectl port-forward svc/prometheus 9090:9090 -n monitoring


  4. Preview the application using Web Preview option.
    Before you Click the Web Preview button as explained here,
    first change the default listening port from 8080 => 9090 (forwarded port)






share|improve this answer

























  • Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

    – GABAKU GIK
    Jun 3 at 18:43












  • One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

    – Nepomucen
    Jun 4 at 9:49











  • Thank you very much. I'm glad if you can tell us about the URL question

    – GABAKU GIK
    Jun 4 at 11:01











  • Please check again my updated post. Everything should be clear now.

    – Nepomucen
    Jun 4 at 11:12











  • Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

    – GABAKU GIK
    Jun 4 at 18:22











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f969858%2fi-want-to-display-the-gui-of-prometheus-and-grafana-on-kubernetes%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Welcome on StackExchange @GABAKU GIK



Use following commands to access them respectively:



  1. Prometheus dashboard:

kubectl port-forward svc/prometheus 9090:9090 -n monitoring



  1. Grafana dashboard:

kubectl --namespace monitoring port-forward svc/grafana 3000




Promethues console:



Once you run successfully first kubectl command you should see in your terminal similar output:



Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090


then open the URL: 'http://localhost:9090'



enter image description here



Update:




First general remark for using 'kubectl port-forward' command'.
By default you can access/preview the application's GUI only on the same host where the kubectl port-forward command was issued (this is why 'localhost' is seen in the URL of Promethues console)




for fresh GCP users:



I can see you have a Managed Kubernetes version (GKE).
In that case the easiest way for you to access Prometheus console is with help of Cloud Shell.



  1. How to start a new Cloud Shell session is described here

  2. Once your shell session is initialized, issue the following command to configure your 'kubectl' command line tool, to be able to talk to your k8s cluster:
    gcloud container clusters get-credentials [CLUSTER_NAME]


  3. On the same shell session, start port-forwarding to Prometheus dashboard:
    kubectl port-forward svc/prometheus 9090:9090 -n monitoring


  4. Preview the application using Web Preview option.
    Before you Click the Web Preview button as explained here,
    first change the default listening port from 8080 => 9090 (forwarded port)






share|improve this answer

























  • Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

    – GABAKU GIK
    Jun 3 at 18:43












  • One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

    – Nepomucen
    Jun 4 at 9:49











  • Thank you very much. I'm glad if you can tell us about the URL question

    – GABAKU GIK
    Jun 4 at 11:01











  • Please check again my updated post. Everything should be clear now.

    – Nepomucen
    Jun 4 at 11:12











  • Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

    – GABAKU GIK
    Jun 4 at 18:22















2














Welcome on StackExchange @GABAKU GIK



Use following commands to access them respectively:



  1. Prometheus dashboard:

kubectl port-forward svc/prometheus 9090:9090 -n monitoring



  1. Grafana dashboard:

kubectl --namespace monitoring port-forward svc/grafana 3000




Promethues console:



Once you run successfully first kubectl command you should see in your terminal similar output:



Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090


then open the URL: 'http://localhost:9090'



enter image description here



Update:




First general remark for using 'kubectl port-forward' command'.
By default you can access/preview the application's GUI only on the same host where the kubectl port-forward command was issued (this is why 'localhost' is seen in the URL of Promethues console)




for fresh GCP users:



I can see you have a Managed Kubernetes version (GKE).
In that case the easiest way for you to access Prometheus console is with help of Cloud Shell.



  1. How to start a new Cloud Shell session is described here

  2. Once your shell session is initialized, issue the following command to configure your 'kubectl' command line tool, to be able to talk to your k8s cluster:
    gcloud container clusters get-credentials [CLUSTER_NAME]


  3. On the same shell session, start port-forwarding to Prometheus dashboard:
    kubectl port-forward svc/prometheus 9090:9090 -n monitoring


  4. Preview the application using Web Preview option.
    Before you Click the Web Preview button as explained here,
    first change the default listening port from 8080 => 9090 (forwarded port)






share|improve this answer

























  • Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

    – GABAKU GIK
    Jun 3 at 18:43












  • One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

    – Nepomucen
    Jun 4 at 9:49











  • Thank you very much. I'm glad if you can tell us about the URL question

    – GABAKU GIK
    Jun 4 at 11:01











  • Please check again my updated post. Everything should be clear now.

    – Nepomucen
    Jun 4 at 11:12











  • Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

    – GABAKU GIK
    Jun 4 at 18:22













2












2








2







Welcome on StackExchange @GABAKU GIK



Use following commands to access them respectively:



  1. Prometheus dashboard:

kubectl port-forward svc/prometheus 9090:9090 -n monitoring



  1. Grafana dashboard:

kubectl --namespace monitoring port-forward svc/grafana 3000




Promethues console:



Once you run successfully first kubectl command you should see in your terminal similar output:



Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090


then open the URL: 'http://localhost:9090'



enter image description here



Update:




First general remark for using 'kubectl port-forward' command'.
By default you can access/preview the application's GUI only on the same host where the kubectl port-forward command was issued (this is why 'localhost' is seen in the URL of Promethues console)




for fresh GCP users:



I can see you have a Managed Kubernetes version (GKE).
In that case the easiest way for you to access Prometheus console is with help of Cloud Shell.



  1. How to start a new Cloud Shell session is described here

  2. Once your shell session is initialized, issue the following command to configure your 'kubectl' command line tool, to be able to talk to your k8s cluster:
    gcloud container clusters get-credentials [CLUSTER_NAME]


  3. On the same shell session, start port-forwarding to Prometheus dashboard:
    kubectl port-forward svc/prometheus 9090:9090 -n monitoring


  4. Preview the application using Web Preview option.
    Before you Click the Web Preview button as explained here,
    first change the default listening port from 8080 => 9090 (forwarded port)






share|improve this answer















Welcome on StackExchange @GABAKU GIK



Use following commands to access them respectively:



  1. Prometheus dashboard:

kubectl port-forward svc/prometheus 9090:9090 -n monitoring



  1. Grafana dashboard:

kubectl --namespace monitoring port-forward svc/grafana 3000




Promethues console:



Once you run successfully first kubectl command you should see in your terminal similar output:



Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090


then open the URL: 'http://localhost:9090'



enter image description here



Update:




First general remark for using 'kubectl port-forward' command'.
By default you can access/preview the application's GUI only on the same host where the kubectl port-forward command was issued (this is why 'localhost' is seen in the URL of Promethues console)




for fresh GCP users:



I can see you have a Managed Kubernetes version (GKE).
In that case the easiest way for you to access Prometheus console is with help of Cloud Shell.



  1. How to start a new Cloud Shell session is described here

  2. Once your shell session is initialized, issue the following command to configure your 'kubectl' command line tool, to be able to talk to your k8s cluster:
    gcloud container clusters get-credentials [CLUSTER_NAME]


  3. On the same shell session, start port-forwarding to Prometheus dashboard:
    kubectl port-forward svc/prometheus 9090:9090 -n monitoring


  4. Preview the application using Web Preview option.
    Before you Click the Web Preview button as explained here,
    first change the default listening port from 8080 => 9090 (forwarded port)







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 5 at 9:31

























answered Jun 3 at 14:24









NepomucenNepomucen

2314




2314












  • Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

    – GABAKU GIK
    Jun 3 at 18:43












  • One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

    – Nepomucen
    Jun 4 at 9:49











  • Thank you very much. I'm glad if you can tell us about the URL question

    – GABAKU GIK
    Jun 4 at 11:01











  • Please check again my updated post. Everything should be clear now.

    – Nepomucen
    Jun 4 at 11:12











  • Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

    – GABAKU GIK
    Jun 4 at 18:22

















  • Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

    – GABAKU GIK
    Jun 3 at 18:43












  • One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

    – Nepomucen
    Jun 4 at 9:49











  • Thank you very much. I'm glad if you can tell us about the URL question

    – GABAKU GIK
    Jun 4 at 11:01











  • Please check again my updated post. Everything should be clear now.

    – Nepomucen
    Jun 4 at 11:12











  • Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

    – GABAKU GIK
    Jun 4 at 18:22
















Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

– GABAKU GIK
Jun 3 at 18:43






Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL is http://localhost:9090 Are you sure?

– GABAKU GIK
Jun 3 at 18:43














One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

– Nepomucen
Jun 4 at 9:49





One small correction, I can see now that your Promethues service is named differently. So in your case you should change 'prometheus-k8s' to 'prometheus'. I will update my post accordingly.

– Nepomucen
Jun 4 at 9:49













Thank you very much. I'm glad if you can tell us about the URL question

– GABAKU GIK
Jun 4 at 11:01





Thank you very much. I'm glad if you can tell us about the URL question

– GABAKU GIK
Jun 4 at 11:01













Please check again my updated post. Everything should be clear now.

– Nepomucen
Jun 4 at 11:12





Please check again my updated post. Everything should be clear now.

– Nepomucen
Jun 4 at 11:12













Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

– GABAKU GIK
Jun 4 at 18:22





Thank you very much. I understand. Thank you for your help. I will try to see if I can do it myself next time.

– GABAKU GIK
Jun 4 at 18:22

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f969858%2fi-want-to-display-the-gui-of-prometheus-and-grafana-on-kubernetes%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020