Is there a way to download the container image from a pod in kuberentes environment?
You cannot do it by Kubernetes itself, by any special command, etc. Here is a discussion about it.
But you still can use docker commit
command right on the node and save a state of your container as a new image like that:
- Get container's ID, and node where it is running in detailed pod information:
kubectl describe $POD
. You needContainer ID
andNode
values. - Connect to a node which you got on a previous step and call:
docker commit $CONTAINER_ID saved-image:1
.