我们有k8s集群,并且我有正在其中运行的应用程序。现在,我尝试添加https://prometheus.io/我使用命令
helm install stable/prometheus --version 6.7.4 --name my-prometheus
此命令有效,我知道了
NAME: my-prometheus
LAST DEPLOYED: Tue Feb 5 15:21:46 2019
NAMESPACE: default
STATUS: DEPLOYED
...
当我运行命令
kubectl get services
我知道了
kubernetes ClusterIP 100.64.0.1 <none> 443/TCP 2d4h
my-prometheus-alertmanager ClusterIP 100.75.244.55 <none> 80/TCP 8m44s
my-prometheus-kube-state-metrics ClusterIP None <none> 80/TCP 8m43s
my-prometheus-node-exporter ClusterIP None <none> 9100/TCP 8m43s
my-prometheus-pushgateway ClusterIP 100.75.24.67 <none> 9091/TCP 8m43s
my-prometheus-server ClusterIP 100.33.26.206 <none> 80/TCP 8m43s
我没有获得任何外部IP
有人知道如何添加吗?通过服务?对此的任何示例
更新
我添加了以下yml
apiVersion: v1
kind: Service
metadata:
name: prometheus-service
spec:
selector:
app: prometheus-server
type: LoadBalancer
ports:
- port: 8080
targetPort: 9090
nodePort: 30001
创建成功的人
现在,我在运行kubectl get services时看到了外部ip,就像>
my-prometheus-server LoadBalancer 100.33.26.206 8080:30001/TCP 80/TCP 8m43s
而且我在浏览器中使用100.33.26.206:30001,但没有任何反应,有什么想法吗?
我们有k8s集群,并且我有正在其中运行的应用程序。现在,我尝试添加https://prometheus.io/,并使用命令helm install stable / prometheus --version 6.7.4 --name my-prometheus ...