0

I wanted to generate a list or table with the given information for all containers running on the given Kubernetes cluster:

  1. Container's Image Name
  2. Contianer's OS Name
  3. Container's OS Version

The purpose is to get an inventory of all OS distro is being used in workload.

ParasPatel
  • 416
  • 4
  • 7
  • This isn't information that Kubernetes "knows" about your containers. Your only option would be to `kubectl exec` something inside the container that can get the information you want...and at that point, it's no longer a kubernetes question. It's just "how do I tell what distribution I'm running?", and a cursory search should reveal a variety of resources to help with that question. – larsks Jan 17 '21 at 01:52
  • You will have to write a custom script for this purpose – CodeWizard Jan 17 '21 at 02:07

1 Answers1

2

As mentioned by @larsks & @CodeWizard, you will have to write a custom script to achieve the purpose. You can refer https://stackoverflow.com/a/51041676/1753098, to begin with.

hdhruna
  • 865
  • 6
  • 15