【问题标题】:How do I find out what image is running in a Kubernetes VM on GCE?如何找出 GCE 上的 Kubernetes VM 中运行的映像是什么?
【发布时间】:2017-02-06 20:15:36
【问题描述】:

我使用cluster/kube-up.sh 在 Google Compute Engine 中创建了一个 Kubernetes 集群。如何找出 GCE 用于创建虚拟机的 Linux 映像?我已经使用 SSH 登录了一些节点,但通常的命令(uname -a 等)没有告诉我。

kubernetes/cluster/gce/config-default.sh 的默认配置文件似乎没有提供任何线索。

【问题讨论】:

    标签: kubernetes google-compute-engine


    【解决方案1】:

    它使用称为 Google Container VM 映像的东西。在这里查看宣布它的博文:

    https://cloudplatform.googleblog.com/2016/09/introducing-Google-Container-VM-Image.html

    【讨论】:

      【解决方案2】:

      有两种简单的查看方式

      1. 在基于 Kubernetes GUI 的仪表板中,单击节点
      2. 从 kubernetes 主节点的命令行使用kubectl describe pods/{pod-name}

      (确保选择正确的命名空间,如果您正在使用任何命名空间。)

      这是一个示例输出,请查看输出的“图像”标签

      kubectl describe pods/fedoraapache
      Name:                fedoraapache
      Namespace:            default
      Image(s):            fedora/apache
      Node:                127.0.0.1/127.0.0.1
      Labels:                name=fedoraapache
      Status:                Running
      Reason:
      Message:
      IP:                172.17.0.2
      Replication Controllers:    <none>
      Containers:
        fedoraapache:
          Image:        fedora/apache
          State:        Running
            Started:        Thu, 06 Aug 2015 03:38:37 -0400
          Ready:        True
          Restart Count:    0
      Conditions:
        Type        Status
        Ready     True
      Events:
        FirstSeen                LastSeen            Count    From            SubobjectPath                Reason        Message
        Thu, 06 Aug 2015 03:38:35 -0400    Thu, 06 Aug 2015 03:38:35 -0400    1    {scheduler }                            scheduled    Successfully assigned fedoraapache to 127.0.0.1
        Thu, 06 Aug 2015 03:38:35 -0400    Thu, 06 Aug 2015 03:38:35 -0400    1    {kubelet 127.0.0.1}    implicitly required container POD    pulled        Pod container image "gcr.io/google_containers/pause:0.8.0" already present on machine
        Thu, 06 Aug 2015 03:38:36 -0400    Thu, 06 Aug 2015 03:38:36 -0400    1    {kubelet 127.0.0.1}    implicitly required container POD    created        Created with docker id 98aeb13c657b
        Thu, 06 Aug 2015 03:38:36 -0400    Thu, 06 Aug 2015 03:38:36 -0400    1    {kubelet 127.0.0.1}    implicitly required container POD    started        Started with docker id 98aeb13c657b
        Thu, 06 Aug 2015 03:38:37 -0400    Thu, 06 Aug 2015 03:38:37 -0400    1    {kubelet 127.0.0.1}    spec.containers{fedoraapache}        created        Created with docker id debe7fe1ff4f
        Thu, 06 Aug 2015 03:38:37 -0400    Thu, 06 Aug 2015 03:38:37 -0400    1    {kubelet 127.0.0.1}    spec.containers{fedoraapache}        started        Started with docker id debe7fe1ff4f
      

      【讨论】:

      • 谢谢。此命令显示“图像:nginx”。我如何才能了解更多关于该图像中的发行版的信息(假设是图像详细信息)?
      • 在描述中查找图片名称.. 添加示例输出
      猜你喜欢
      • 2016-12-12
      • 2015-08-30
      • 2016-04-05
      • 2015-09-14
      • 1970-01-01
      • 2018-10-24
      • 1970-01-01
      • 1970-01-01
      • 2019-05-27
      相关资源
      最近更新 更多