kubernetes - 无法使用 nodeport 访问 ibm ICP kubernetes 上已部署的应用程序 url
问题描述
无法使用 nodeport 访问 ibm ICP kubernetes 上已部署的应用程序 URL。
应用程序运行成功,但在启动应用程序时无法在浏览器上访问。
日志运行命令 -kubectl describe pods <podname>
日志 -
roar-app:
Container ID: docker://c3ac3059f493a9567fd79d76879dc7fa230a6790969e2f8ea6c922ed37300480
Image: mycluster.icp:8500/ibmcom/roartomcat:2
Image ID: docker-
pullable://mycluster.icp:8500/ibmcom/roartomcat@sha256:c85353bc1cba104940e8f008752decc38b2191af06af7e0bc7fa7c4b83138570
Port: <none>
Host Port: <none>
State: Running
Started: Fri, 31 Jan 2020 06:33:50 +0000
Ready: True
Restart Count: 0
Limits:
cpu: 500m
memory: 2Gi
Requests:
cpu: 100m
memory: 128Mi
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-kb5vk (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
default-token-kb5vk:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-kb5vk
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m45s default-scheduler Successfully assigned default/roar-app-7d68649546-xwx6p
to 10.99.15.21
Normal Pulling 9m28s kubelet, 10.99.15.21 pulling image "mycluster.icp:8500/ibmcom/roartomcat:2"
Normal Pulled 9m22s kubelet, 10.99.15.21 Successfully pulled image "mycluster.icp:8500/ibmcom/roartomcat:2"
Normal Created 9m22s kubelet, 10.99.15.21 Created container
Normal Started 9m21s kubelet, 10.99.15.21 Started container
访问应用程序 url -<ip>:<nodeport>/<mapping url>
http://10.99.15.26:31762/ne
错误 - 无法访问此站点10.99.15.26
响应时间过长。
Try:
Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
任何人都可以帮助解决如何使用 nodeport 主机 url 访问应用程序的问题,如果它不是正确的方式,因为无法使用 nodeport 在 IBM ICP kubernetes 上访问已部署的应用程序 url。应用程序运行成功,但在启动应用程序时无法在浏览器上访问。
解决方案
推荐阅读
- firebase - 如何在 Firebase 中向现有父母添加新孩子
- android - 回收器视图项目装饰,getItemOffsets 仅在最后添加的项目上调用
- tensorflow - 如何设置本地模型存储库 - 带有 Minio 的 Tensorrt 推理服务器
- excel - 匹配两个 Excel 表格中的相同条目
- c# - 如何将 DbContext 与 TPL(任务)一起使用?
- reactjs - vsCode 中的 React+Jest:如何在集成测试中进行更深入的调试?
- swift - 是否可以在 Parse 中创建特定对象的数组?
- python - 使用正则表达式在文件名末尾提取版本号
- c# - 想知道如何完成一个函数,让控制台从 20 个答案的数组中写出一个随机字符串?
- android - 如何在 Kotlin 中制作多个构造函数?