NimbleArchitect / kubectl-ice

Kubectl-ice is an open-source tool for Kubernetes users to monitor and optimize container resource usage. Features include usage breakdowns for pods and containers, making scaling and optimization easier. The tool is compatible with major cloud providers and is actively developed by a community of contributors
Apache License 2.0
250 stars 9 forks source link

skip type = "I" containers #3

Closed dmitry-mightydevops closed 2 years ago

dmitry-mightydevops commented 2 years ago
➜ k ice cpu -l "app.kubernetes.io/name in (backend)"    
T  PODNAME                                   CONTAINER      USED  REQUEST  LIMIT  %REQ  %LIMIT
I  protct-backend-v1-5648c9d8df-nx9nd        install        0m    0m       0m     -     -
S  protct-backend-v1-5648c9d8df-nx9nd        backend        72m   0m       1000m  -     7.13
I  protct-celery-beat-v1-6686dfc9df-lw48m    install        0m    0m       0m     -     -
S  protct-celery-beat-v1-6686dfc9df-lw48m    celery-beat    1m    0m       1000m  -     0.02
I  protct-celery-worker-v1-8664579cd5-xhxqk  install        0m    0m       0m     -     -
S  protct-celery-worker-v1-8664579cd5-xhxqk  celery-worker  2m    0m       1000m  -     0.19
I  protct-django-migrations-v1--1-crcb8      install        0m    0m       0m     -     -
S  protct-django-migrations-v1--1-crcb8      migrations     0m    0m       256m   -     -

I assume "I" == init container? What is "S" type container?

Also is it possible all init containers and concentrate only on non-terminated containers?

NimbleArchitect commented 2 years ago

Yes I is for an init container and S is for a standard or normal container, I believe it's buried somewhere in the documentation.

Regarding your question about the non terminated containers, are you asking for a command line switch that only shows currently running containers? or something else as I'm not sure I follow

dmitry-mightydevops commented 2 years ago

right, technically speaking I'm less interested in INIT containers if I need to get a picture of what is going on and I-containers just clog the view.

dmitry-mightydevops commented 2 years ago

P.S. - great plugin I love it :)

NimbleArchitect commented 2 years ago

right, technically speaking I'm less interested in INIT containers if I need to get a picture of what is going on and I-containers just clog the view.

Ah, ok

So I'll just hide init containers from the output of the mem and cpu commands by default.

Should be easy enough, leave it with me

NimbleArchitect commented 2 years ago

update v0.0.16 hides Init containers from the cpu and memory output using -i flag will show them if they are needed