Sharing volume between containers within a pod

Chapter 3, Getting Started with Kubernetes, stated that multiple containers within the same Kubernetes pod can share the same pod IP address, network port, and IPC. Therefore, applications can communicate with each other through a localhost network. However, the filesystem is segregated.

The following diagram shows that Tomcat and nginx are in the same pod. Those applications can communicate with each other via localhost. However, they can't access each other's config files:

Some applications won't affect these scenarios and behavior, but some applications may have some use cases that require them to use a shared directory or file. Consequently, developers and Kubernetes administrators need to be aware of the different types of stateless and stateful applications.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset