DEV Community

Discussion on: As a developer, what are the cool things you like to do with containers?

Collapse
 
stevesims2 profile image
SteveSims2 • Edited

In our development organization we have 5 in-house clusters. Our newest product consists of ~15 helm v3 charts corresponding to about 22 pods. Some of the charts have multiple deployments.) Our container and chart repo is an in-house harbor repo.

Our -ui apps were using nginx until recently. One day, before the switchover, I realized I could co-opt one of the containers of a ui pod by getting on the clusters worker node that it was running on and locating the container using docker commands, stop the currently running container (and just let kubernetes restart it)....but then doing a docker commit on the container that I stopped.

I then tagged it for the library project on harbor and pushed it there. By running that one I started finding that I could exec into it, install whatever I wanted, and re-commit the new modified container.

Eventually I installed pwsh, and kubectl and wrote a small script to query the status of all 5 of our clusters and all of the pods running on them, and use powershell's convertto-html to put that where nginx could serve it up.

Added a few features so that if any node went NotReady it would send an email, and a feature to retain its 5 minute index.html updates to an archive.

(This is my first post here, btw)... :)