Ephemeral container

308

An Ephemeral Container is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers differ from other containers in that they lack guarantees for resources or execution, and they will never be automatically restarted, so they are not appropriate for building applications.

Ephemeral containers are useful for interactive troubleshooting when kubectl exec is insufficient because a container has crashed or a container image doesn’t include debugging utilities.

Stuff you wanna know:

  1. Ephemeral containers have no resource or scheduling guarantees.
  2. Ephemeral containers will not be restarted when they exit or when a Pod is removed or restarted.
  3. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.
  4. To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod.
  5. Ephemeral containers may not be removed or restarted.
  6. Ephemeral containers are described using ContainerSpec as regular containers (But. Many fields are incompatible, and will not be allowed for ephemeral containers.)
  7. Ephemeral containers can not have ports.
  8. Ephemeral containers are created using a special ephemeralcontainers handler in the API rather than by adding them directly to pod.spec
  9. You can’t change or remove an ephemeral container after you have added it to a Pod.
  10. When using ephemeral containers, it’s helpful to enable process namespace sharing so you can view processes in other containers.

More stuff: