Bruin

关于阿里云 k8s 集群, node 节点镜像过多问题

  •  
  •   Bruin · Sep 10, 2019 · 10173 views
    This topic created in 2466 days ago, the information mentioned may be changed or developed.

    打包成镜像发布,导致 worker node 节点上的无用镜像越来越多,有什么好的方式在构建完服务后,自动清除多余的镜像; 我想的是写个定时任务去删除这些 images: docker images | grep -E "$CI_APPLICATION_REPOSITORY" | awk 'NR==4,NR==100 {print $3}'| xargs -r docker rmi -f 但是感觉这样很沙雕

    4 replies    2019-09-10 17:09:45 +08:00
    maichael
        1
    maichael  
       Sep 10, 2019
    kubernetes 有自带的垃圾回收机制,你设置低一点就好了。
    Bruin
        2
    Bruin  
    OP
       Sep 10, 2019
    @maichael ok 了解了
    Bruin
        3
    Bruin  
    OP
       Sep 10, 2019
    @maichael 老哥 这个 gc 得设置是在 master 上设置,还是在 worker 机子上设置呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3716 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 04:26 · PVG 12:26 · LAX 21:26 · JFK 00:26
    ♥ Do have faith in what you're doing.