how to execute docker diff command using kubernetes

6/3/2017

I am using docker diff in my application in order to find all changed files in a container. Now, my application manages containers through Kubernetes and don't have a direct access to them. I found Kubernetes implementations for several docker commands (like kubectl logs), bit docker diff is missed.

Is there a way to execute docker diff for a pod through Kubernetes?

Many thanks

-- Zavolokin Roman
kubernetes

1 Answer

6/4/2017

Kubernetes (kubectl) does not offer an equivalent command. Ideally you should not be using this command at all outside your local development environment (which is docker)

The best practice is to start containers with readonly root filesystem, so that you avoid storing any important state in containers. Kubernetes can kill and restart your pod in another node as a new container, so you should not care about the docker diff that happens on the container.

-- AhmetB - Google
Source: StackOverflow