Amazon web services Can';t从aws上的公共IP访问普罗米修斯

Amazon web services Can';t从aws上的公共IP访问普罗米修斯,amazon-web-services,synchronization,ip,kubernetes,prometheus,Amazon Web Services,Synchronization,Ip,Kubernetes,Prometheus,使用kops在AWS上安装k8s群集 使用Helm安装的Prometheus: $ helm install stable/prometheus \ --set server.persistentVolume.enabled=false \ --set alertmanager.persistentVolume.enabled=false 然后按照此注释进行端口转发: Get the Prometheus server URL by running these commands

使用kops在AWS上安装k8s群集

使用
Helm
安装的
Prometheus

$ helm install stable/prometheus \
    --set server.persistentVolume.enabled=false \
    --set alertmanager.persistentVolume.enabled=false
然后按照此注释进行
端口转发

Get the Prometheus server URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace default port-forward $POD_NAME 9090
AWS上我的EC2实例公共IP是
12.29.43.14
(不正确)。当我试图从浏览器访问它时:

http://12.29.43.14:9090
无法访问该页。为什么?


另一个问题是,安装了普罗米修斯图表后,
alertmanager
pod没有运行:

ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4       1/2       CrashLoopBackOff   1          9s
ungaged-woodpecker-prometheus-kube-state-metrics-5fd97698cktsj5   1/1       Running            0          9s
ungaged-woodpecker-prometheus-node-exporter-45jtn                 1/1       Running            0          9s
ungaged-woodpecker-prometheus-node-exporter-ztj9w                 1/1       Running            0          9s
ungaged-woodpecker-prometheus-pushgateway-57b67c7575-c868b        0/1       Running            0          9s
ungaged-woodpecker-prometheus-server-7f858db57-w5h2j              1/2       Running            0          9s
检查吊舱详细信息:

$ kubectl describe po ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4
Name:           ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4
Namespace:      default
Node:           ip-100.200.0.1.ap-northeast-1.compute.internal/100.200.0.1
Start Time:     Fri, 26 Jan 2018 02:45:10 +0000
Labels:         app=prometheus
                component=alertmanager
                pod-template-hash=2959465499
                release=ungaged-woodpecker
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff","uid":"ec...
                kubernetes.io/limit-ranger=LimitRanger plugin set: cpu request for container prometheus-alertmanager; cpu request for container prometheus-alertmanager-configmap-reload
Status:         Running
IP:             100.96.6.91
Created By:     ReplicaSet/ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff
Controlled By:  ReplicaSet/ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff
Containers:
  prometheus-alertmanager:
    Container ID:  docker://e9fe9d7bd4f78354f2c072d426fa935d955e0d6748c4ab67ebdb84b51b32d720
    Image:         prom/alertmanager:v0.9.1
    Image ID:      docker-pullable://prom/alertmanager@sha256:ed926b227327eecfa61a9703702c9b16fc7fe95b69e22baa656d93cfbe098320
    Port:          9093/TCP
    Args:
      --config.file=/etc/config/alertmanager.yml
      --storage.path=/data
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Fri, 26 Jan 2018 02:45:26 +0000
      Finished:     Fri, 26 Jan 2018 02:45:26 +0000
    Ready:          False
    Restart Count:  2
    Requests:
      cpu:        100m
    Readiness:    http-get http://:9093/%23/status delay=30s timeout=30s period=10s #success=1 #failure=3
    Environment:  <none>
    Mounts:
      /data from storage-volume (rw)
      /etc/config from config-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-wppzm (ro)
  prometheus-alertmanager-configmap-reload:
    Container ID:  docker://9320a0f157aeee7c3947027667aa6a2e00728d7156520c19daec7f59c1bf6534
    Image:         jimmidyson/configmap-reload:v0.1
    Image ID:      docker-pullable://jimmidyson/configmap-reload@sha256:2d40c2eaa6f435b2511d0cfc5f6c0a681eeb2eaa455a5d5ac25f88ce5139986e
    Port:          <none>
    Args:
      --volume-dir=/etc/config
      --webhook-url=http://localhost:9093/-/reload
    State:          Running
      Started:      Fri, 26 Jan 2018 02:45:11 +0000
    Ready:          True
    Restart Count:  0
    Requests:
      cpu:        100m
    Environment:  <none>
    Mounts:
      /etc/config from config-volume (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-wppzm (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          False
  PodScheduled   True
Volumes:
  config-volume:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      ungaged-woodpecker-prometheus-alertmanager
    Optional:  false
  storage-volume:
    Type:    EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
  default-token-wppzm:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-wppzm
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.alpha.kubernetes.io/notReady:NoExecute for 300s
                 node.alpha.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                 Age                From                                                      Message
  ----     ------                 ----               ----                                                      -------
  Normal   Scheduled              34s                default-scheduler                                         Successfully assigned ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4 to ip-100.200.0.1.ap-northeast-1.compute.internal
  Normal   SuccessfulMountVolume  34s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  MountVolume.SetUp succeeded for volume "storage-volume"
  Normal   SuccessfulMountVolume  34s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  MountVolume.SetUp succeeded for volume "config-volume"
  Normal   SuccessfulMountVolume  34s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  MountVolume.SetUp succeeded for volume "default-token-wppzm"
  Normal   Pulled                 33s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Container image "jimmidyson/configmap-reload:v0.1" already present on machine
  Normal   Created                33s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Created container
  Normal   Started                33s                kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Started container
  Normal   Pulled                 18s (x3 over 34s)  kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Container image "prom/alertmanager:v0.9.1" already present on machine
  Normal   Created                18s (x3 over 34s)  kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Created container
  Normal   Started                18s (x3 over 33s)  kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Started container
  Warning  BackOff                2s (x4 over 32s)   kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Back-off restarting failed container
  Warning  FailedSync             2s (x4 over 32s)   kubelet, ip-100.200.0.1.ap-northeast-1.compute.internal  Error syncing pod
$kubectl描述未成年啄木鸟-prometheus-alertmanager-6f9f8b98ff-qhhw4
名称:ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4
名称空间:默认值
节点:ip-100.200.0.1.ap-northeast-1.compute.internal/100.200.0.1
开始时间:2018年1月26日星期五02:45:10+0000
标签:app=prometheus
组件=警报管理器
pod模板哈希=2959465499
释放=未老化啄木鸟
注释:kubernetes.io/created by={“kind”:“SerializedReference”,“apiVersion”:“v1”,“reference”:{“kind”:“ReplicaSet”,“namespace”:“default”,“name”:“ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff”,“uid”:“ec…”。。。
io/limit ranger=LimitRanger插件集:对容器prometheus alertmanager的cpu请求;对容器prometheus alertmanager的cpu请求configmap重载
状态:正在运行
IP:100.96.6.91
创建人:ReplicaSet/ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff
控制人:ReplicaSet/ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff
容器:
普罗米修斯警觉经理:
容器ID:docker://e9fe9d7bd4f78354f2c072d426fa935d955e0d6748c4ab67ebdb84b51b32d720
图:prom/alertmanager:v0.9.1
图像ID:docker-pullable://prom/alertmanager@sha256:ed926b227327eecfa61a9703702c9b16fc7fe95b69e22baa656d93cfbe098320
端口:9093/TCP
Args:
--config.file=/etc/config/alertmanager.yml
--storage.path=/data
国家:等待
原因:仓促退却
最后状态:终止
原因:错误
退出代码:1
开始时间:2018年1月26日星期五02:45:26+0000
完成日期:2018年1月26日星期五02:45:26+0000
就绪:错误
重新启动计数:2
请求:
中央处理器:100米
准备就绪:http get http://:9093/%23/状态延迟=30s超时=30s周期=10s#成功=1#失败=3
环境:
挂载:
/来自存储卷(rw)的数据
/来自配置卷(rw)的etc/config
/来自默认令牌wppzm(ro)的var/run/secrets/kubernetes.io/serviceCount
prometheus alertmanager配置映射重新加载:
容器ID:docker://9320a0f157aeee7c3947027667aa6a2e00728d7156520c19daec7f59c1bf6534
图:jimmidyson/configmap重新加载:v0.1
图像ID:docker-pullable://jimmidyson/configmap-reload@sha256:2d40c2eaa6f435b2511d0cfc5f6c0a681eeb2eaa455a5d5ac25f88ce5139986e
端口:
Args:
--卷目录=/etc/config
--webhook url=http://localhost:9093/-/重新装载
状态:正在运行
开始时间:2018年1月26日星期五02:45:11+0000
准备好了吗
重新启动计数:0
请求:
中央处理器:100米
环境:
挂载:
/来自配置卷(ro)的etc/config
/来自默认令牌wppzm(ro)的var/run/secrets/kubernetes.io/serviceCount
条件:
类型状态
初始化为True
准备错误
播客预定为真
卷数:
配置卷:
类型:ConfigMap(由ConfigMap填充的卷)
姓名:未成年啄木鸟普罗米修斯
可选:false
存储量:
类型:EmptyDir(共享pod生存期的临时目录)
中等:
默认令牌wppzm:
类型:Secret(由Secret填充的卷)
SecretName:默认令牌wppzm
可选:false
QoS等级:Burstable
节点选择器:
容差:node.alpha.kubernetes.io/notReady:NoExecute持续300秒
node.alpha.kubernetes.io/不可访问:不执行300秒
活动:
从消息中键入原因年龄
----     ------                 ----               ----                                                      -------
正常计划的34s默认计划程序已成功将ungaged-woodpecker-prometheus-alertmanager-6f9f8b98ff-qhhw4分配给ip-100.200.0.1.ap-northeast-1.compute.internal
正常成功装入卷34s kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal MountVolume。卷“存储卷”的安装成功
正常成功装入卷34s kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal MountVolume.SetUp成功装入卷“配置卷”
正常成功装入卷34s kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal MountVolume.SetUp成功装入卷“默认令牌wppzm”
正常拉动33s kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal容器映像“jimmidyson/configmap重新加载:v0.1”已出现在计算机上
正常创建33s kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal创建容器
正常启动33s kubelet,ip-100.200.0.1.ap-东北-1.compute.内部启动容器
正常拉动18秒(x3对34秒)kubelet,ip-100.200.0.1.ap-northeast-1.compute。机器上已存在内部容器映像“prom/alertmanager:v0.9.1”
正常创建的18秒(x3/34秒)kubelet,ip-100.200.0.1.ap-northeast-1.compute.internal创建的容器
正常启动18秒(x3/33秒)kubelet,ip-100.200.0.1.ap-northeast-1.compute.内部启动容器
警告