gpt4 book ai didi

kubernetes - k8s replicaSet 状态困惑

转载 作者:行者123 更新时间:2023-12-02 11:55:37 24 4
gpt4 key购买 nike

我有两项服务:

  • bayonetta:后端 clusterIp 服务,replicaset=2
  • 隐藏:前端节点端口服务,replicaset=1

  • 我跑了 kubectl get all .我看到 replicaSet 部分的第 3 行和第 4 行所有内容都为 0,为什么在没有可用内容时我们有这两行?
    replicaset.apps/bayonetta-deployment-5b75868d89   2         2         2       3h36m
    replicaset.apps/bayonetta-deployment-5c65f74c8b 0 0 0 176m
    replicaset.apps/hide-deployment-575b6bc68d 0 0 0 3h12m
    replicaset.apps/hide-deployment-66d955986b 1 1 1 155m

    enter image description here

    最佳答案

    您可能更新了您的 Deployments ,这导致扩大新的 ReplicaSets并缩小现有的规模。查看 Kubernetes 文档 here ,举个例子:

    Run kubectl get rs to see that the Deployment updated the Pods by creating a new ReplicaSet and scaling it up to 3 replicas, as well as scaling down the old ReplicaSet to 0 replicas.

    kubectl get rs

    The output is similar to this:

    NAME                          DESIRED   CURRENT   READY   AGE
    nginx-deployment-1564180365 3 3 3 6s
    nginx-deployment-2035384211 0 0 0 36s

    关于kubernetes - k8s replicaSet 状态困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61049850/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com