How to test content inside a pod in openshift? How to test content inside a pod in openshift? kubernetes kubernetes

How to test content inside a pod in openshift?


Using the mechanisms provided by kubectl are going to be the least amount of drama, but I have no idea what Gem Train Kubernetes is in order to speak to that specifically

You can grep for the content in the Pod, if it has a shell and grep available:

kubectl exec $the_pod_name -- sh -c 'grep TheStringYouWant /the/path/you/are/testing'

or you can copy the file off of the Pod if you need to do something more complex and the file isn't too big:

kubectl cp ${the_pod_name}:/the/path/in/the/pod ./to/local