【问题标题】:After deploying Istio bookinfo application on EKS, `kubectl get svc` displays the app's services but `Kubectl get pods` returns `no resources found`在 EKS 上部署 Istio bookinfo 应用程序后,`kubectl get svc` 显示应用程序的服务,但 `Kubectl get pods` 返回 `no resources found`
【发布时间】:2021-07-07 11:08:33
【问题描述】:

我在我的 EKS 集群上安装了 Istio,并从示例中安装了 bookinfo。

$ sudo Kubectl apply -f /samples/bookinfo/platform/kube/bookinfo.yaml

安装后,我可以看到服务,但看不到这些服务的 pod

$ sudo Kubectl get services 

NAME.          TYPE
productpage    ClusterIP.   
ratings.       ClusterIP
reviews.       ClusterIP

但是上述服务中的pods是看不到的

$ sudo Kubectl get pods
No resources found in default namespace

知道为什么我可以查看服务,但不能查看通过预订应用安装的服务中的 pod?

【问题讨论】:

  • 你安装的 istio 版本是多少?您是否还可以验证一下您是否没有使用kubectl get pods -A 将您的 pod 部署在另一个命名空间中?
  • 所有输出在我看来都被篡改了。 kubectl 带大写字母,服务末尾有一个点,不传递任何命名空间...

标签: kubernetes istio amazon-eks


【解决方案1】:

我已经用 istio 1.9.3 验证了 bookinfo 应用,它可以正常工作。

我使用以下命令cd istio-1.9.3进入了istio 1.9.3目录,并使用kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml安装了bookinfo应用程序。

kubectl get pods
NAME                              READY   STATUS    RESTARTS   AGE
details-v1-66b6955995-q2nwh       2/2     Running   0          44s
productpage-v1-5d9b4c9849-lhc2b   2/2     Running   0          44s
ratings-v1-fd78f799f-t8gkp        2/2     Running   0          43s
reviews-v1-6549ddccc5-jv2tg       2/2     Running   0          43s
reviews-v2-76c4865449-wjkxx       2/2     Running   0          43s
reviews-v3-6b554c875-9gsnd        2/2     Running   0          42s

kubectl get svc
NAME          TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
details       ClusterIP   10.112.2.127   <none>        9080/TCP   81s
kubernetes    ClusterIP   10.112.0.1     <none>        443/TCP    6m41s
productpage   ClusterIP   10.112.5.110   <none>        9080/TCP   75s
ratings       ClusterIP   10.112.1.157   <none>        9080/TCP   79s
reviews       ClusterIP   10.112.1.106   <none>        9080/TCP   78s

如您所见,pod 和服务均已正确部署。


我只是建议使用最新版本重新部署 bookinfo 应用程序,它应该可以工作。

您也可以使用raw.githubusercontent.com 而不是示例目录来部署它。您可以在 istio documentation 上找到更多相关信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-06
    • 1970-01-01
    • 2021-11-05
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多