Reputation: 155
I have installed Grafana on Kubernetes. The installation is ok. When I do port forwarding, I can access Grafana dashboard. However, when I try to access using nodeport, web times out.
My Grafana service is running
monitoring my-grafana ClusterIP 10.92.253.89 <none> 80/TCP 21
my grafana pod is ok too
monitoring my-grafana-5b7dbf77b7-bzhxb 1/1 Running 0 21d
my nodeport file
kind: Service
apiVersion: v1
metadata:
name: web-srv
spec:
type: NodePort
selector:
app: my-grafana-5b7dbf77b7-bzhxb
ports:
- protocol: TCP
port: 8090
targetPort: 80
nodePort: 31000
my nodes are working ok too
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
prd-scl-it-k8-grafana1-cabd0e-master-0 Ready control-plane,master 21d v1.28.5 172.20.8.129 <none> CentOS Linux 7 (Core) 3.10.0-1160.108.1.el7.x86_64 containerd://1.6.16
prd-scl-it-k8-grafana1-cabd0e-master-1 Ready control-plane,master 21d v1.28.5 172.20.8.197 <none> CentOS Linux 7 (Core) 3.10.0-1160.108.1.el7.x86_64 containerd://1.6.16
prd-scl-it-k8-grafana1-cabd0e-worker-0 Ready node 21d v1.28.5 172.20.8.72 <none> CentOS Linux 7 (Core) 3.10.0-1160.108.1.el7.x86_64 containerd://1.6.16
prd-scl-it-k8-grafana1-cabd0e-worker-1 Ready node 21d v1.28.5 172.20.8.171 <none> CentOS Linux 7 (Core) 3.10.0-1160.108.1.el7.x86_64 containerd://1.6.16
prd-scl-it-k8-grafana1-cabd0e-worker-2 Ready node 21d v1.28.5 172.20.8.47 <none> CentOS Linux 7 (Core) 3.10.0-1160.108.1.el7.x86_64 containerd://1.6.16
when I try to access service in my browser, its not working. I am trying below url (IP belongs to the worker)
http://172.20.8.47:8090 http://172.20.8.47:31000
can someone suggest what I may be doing wrong.
thanks
Upvotes: 0
Views: 45