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;
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
add a comment |
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
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
add a comment |
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
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
kubernetes google-kubernetes-engine
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
Welcome on StackExchange @GABAKU GIK
Use following commands to access them respectively:
- Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
- 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'
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.
- How to start a new Cloud Shell session is described here
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]
On the same shell session, start port-forwarding to Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
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)
Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL ishttp://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
|
show 5 more comments
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Welcome on StackExchange @GABAKU GIK
Use following commands to access them respectively:
- Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
- 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'
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.
- How to start a new Cloud Shell session is described here
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]
On the same shell session, start port-forwarding to Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
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)
Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL ishttp://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
|
show 5 more comments
Welcome on StackExchange @GABAKU GIK
Use following commands to access them respectively:
- Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
- 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'
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.
- How to start a new Cloud Shell session is described here
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]
On the same shell session, start port-forwarding to Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
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)
Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL ishttp://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
|
show 5 more comments
Welcome on StackExchange @GABAKU GIK
Use following commands to access them respectively:
- Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
- 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'
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.
- How to start a new Cloud Shell session is described here
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]
On the same shell session, start port-forwarding to Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
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)
Welcome on StackExchange @GABAKU GIK
Use following commands to access them respectively:
- Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
- 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'
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.
- How to start a new Cloud Shell session is described here
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]
On the same shell session, start port-forwarding to Prometheus dashboard:
kubectl port-forward svc/prometheus 9090:9090 -n monitoring
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)
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 ishttp://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
|
show 5 more comments
Thank you for your reply. In this case, if you want to see the Prometheus dashboard, the URL ishttp://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
|
show 5 more comments
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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